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

CommentFileSizeAuthor
Screen shot 2009-10-10 at 6.58.34 PM.png164.86 KBmattyoung

Comments

markus_petrux’s picture

Status: Active » Fixed

You should be able to do this using form_alter.

Aside, you may want to check out the Markup module:

http://drupal.org/project/markup

mattyoung’s picture

Status: Fixed » Active

form_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"

markus_petrux’s picture

Project: Content Construction Kit (CCK) » Markup
Version: 6.x-2.5 » 6.x-1.x-dev
Component: General » Code
Category: support » feature
mattyoung’s picture

I made a module for this: http://drupal.org/project/nodeincck

It shows another node on both the node edit form and node display.

cyu’s picture

Category: feature » support

Your initial request sounded an awful lot like http://drupal.org/project/form_markup

ebeyrent’s picture

Status: Active » Closed (fixed)

I agree with #5 - use the module recommended there to accomplish your request. Closing out this feature request...