The FAPI let each element have a '#prefix' and '#suffix' markup. How can I have this for CCK text field? I need this for making a legal consent form, like this and see also screenshot attached:
AGREEMENT
Blah blah blah, this is a legal agreement between so and so blah blah bha <-- this is the part that's in the form element's #prefix area
Sign and acknowlege:
[ ]
Please enter "I have read and agree" exactly
It would work great if CCK field can have configure text area for the form field's #prefix/#suffix area. Kind of like the help text which shows up in the form element's '#description' key
And the second part is when the field is display, the #prefix/#suffix text are also shown along with the field's input value
| Comment | File | Size | Author |
|---|---|---|---|
| Screen shot 2009-10-10 at 6.58.34 PM.png | 164.86 KB | mattyoung |
Comments
Comment #1
markus_petrux commentedYou should be able to do this using form_alter.
Aside, you may want to check out the Markup module:
http://drupal.org/project/markup
Comment #2
mattyoung commentedform_alter() is how I made what's in the screenshot. It's kludgy. markup is better but still, it's only half way to what I need: markup only show up in the input form, I need that same text to show up on display. Any pointer on how I can modify markup to show on the display side? What I would like to make is an option in markup to say "Display markup on output"
Comment #3
markus_petrux commentedComment #4
mattyoung commentedI made a module for this: http://drupal.org/project/nodeincck
It shows another node on both the node edit form and node display.
Comment #5
cyu commentedYour initial request sounded an awful lot like http://drupal.org/project/form_markup
Comment #6
ebeyrent commentedI agree with #5 - use the module recommended there to accomplish your request. Closing out this feature request...