Michael van Laar Posted August 13, 2015 Share Posted August 13, 2015 I’d like to add a block of descriptive text (and links) to a template’s backend view. But this description should be detached from all of my fields. So basically I’d like to insert a block of predefined text to a template just like I add a new field. Should I just create a new field type module which doesn’t provide any input functionality and is only used to display the field’s description? This way I could insert my predefined text just like any other field. Unfortunately the default field description cannot contain HTML. But I need HTML tags to be rendered to display clickable links. Link to comment Share on other sites More sharing options...
adrian Posted August 13, 2015 Share Posted August 13, 2015 http://modules.processwire.com/modules/inputfield-textarea-markup/ 2 Link to comment Share on other sites More sharing options...
Michael van Laar Posted August 13, 2015 Author Share Posted August 13, 2015 How could I miss this when browsing the modules directory? Thanks a lot! Link to comment Share on other sites More sharing options...
vwatson Posted June 16, 2022 Share Posted June 16, 2022 I have this same question and found this forum topic from years ago. I have generic fields I use for different things in various templates - say text areas with names text1 to text4. I can't use the label or description options to specify what those fields are used for since that would change based on the template. I'd like to add a text description above various sections in the admin page edit. I looked at that module, but it don't know if it is still compatible. This seems like something there would be a common need for. Link to comment Share on other sites More sharing options...
bernhard Posted June 16, 2022 Share Posted June 16, 2022 1 hour ago, vwatson said: I can't use the label or description options to specify what those fields are used for since that would change based on the template. 1 hour ago, vwatson said: This seems like something there would be a common need for. True, and that need was satisfied 10 years ago ? You can set (almost) every field's label and description in template context: 3 Link to comment Share on other sites More sharing options...
vwatson Posted June 16, 2022 Share Posted June 16, 2022 Oh wow! ? How have I missed that for years??? It's perfect, beautiful, wonderful. Thanks. 2 Link to comment Share on other sites More sharing options...
taotoo Posted June 17, 2022 Share Posted June 17, 2022 14 hours ago, vwatson said: I have generic fields I use for different things in various templates - say text areas with names text1 to text4. A bit off-topic, but I was thinking yesterday how in this situation it would be nice if you could also override field names. So when templating, instead of having the below (which is a bit meaningless when you come back to it later): $person->text3 $person->text1 $person->text2 You could instead have: $person->overview $person->quote $person->biography Maybe it wouldn't be possible/practical though. Link to comment Share on other sites More sharing options...
bernhard Posted June 17, 2022 Share Posted June 17, 2022 There is an issue with an open request for this: https://github.com/processwire/processwire-requests/issues/154 I have shown some possible workarounds - maybe there's a solution for you as well: https://github.com/processwire/processwire-requests/issues/154#issuecomment-1071650652 1 Link to comment Share on other sites More sharing options...
taotoo Posted June 17, 2022 Share Posted June 17, 2022 2 hours ago, bernhard said: There is an issue with an open request for this: https://github.com/processwire/processwire-requests/issues/154 I have shown some possible workarounds - maybe there's a solution for you as well: https://github.com/processwire/processwire-requests/issues/154#issuecomment-1071650652 Ah, I hadn't found that discussion - thanks! Link to comment Share on other sites More sharing options...
vwatson Posted June 17, 2022 Share Posted June 17, 2022 To insert a block of self-standing explanatory text, I created a text field, added it to a template, edited the page and saved it, then went back and set the visibility of the field to Open and Locked. That's a simple example that could have been done in the field description, but I'll be able to use this technique for longer instructions to end users. 1 Link to comment Share on other sites More sharing options...
BrendonKoz Posted June 30, 2022 Share Posted June 30, 2022 A very nice and clean solution! Should your needs grow from this, you might enjoy one of the following options as well: Field Descriptions Extended Process Documentation 1 Link to comment Share on other sites More sharing options...
vwatson Posted June 30, 2022 Share Posted June 30, 2022 Thanks. I wasn't aware of either of those. May come in handy sometime. ? 1 Link to comment Share on other sites More sharing options...
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