JayGee Posted April 26, 2019 Posted April 26, 2019 Pretty much as the title - does anyone have a snazzy way to make a field that doesn't yet have any content front-end editable? Currently, the field cannot be double-clicked if empty but I would like to give users the ability to add missing content to a few specific fields.
elabx Posted April 26, 2019 Posted April 26, 2019 What if you just output placeholder text? (I'd guess you'd have to use <edit> tags) $page->text ? $page->text : "Input text here.." 1
JayGee Posted April 26, 2019 Author Posted April 26, 2019 1 hour ago, elabx said: What if you just output placeholder text? (I'd guess you'd have to use <edit> tags) $page->text ? $page->text : "Input text here.." Perfect thanks - so simple!... I had tried basically every combo of conditionals and was beginning to think it wouldn't work! 1
Zeka Posted April 26, 2019 Posted April 26, 2019 @Guy Incognito Also consider to use $page->if() method. https://processwire.com/api/ref/page/if/ 2
JayGee Posted April 26, 2019 Author Posted April 26, 2019 26 minutes ago, Zeka said: @Guy Incognito Also consider to use $page->if() method. https://processwire.com/api/ref/page/if/ Fully didn’t know about this method - really useful thanks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now