2

I'm building quite complex node form and I need to provide users with additional instructions how to fill the form. Are there any modules that would allow me to add sort of dummy fields with some HTML that would be displayed when user edits or creates new node? I don't want to save any data for these fields. I would like to be able to provide some HTML that will be displayed among other node form elements. Even plain text would do.

1

Try the Markup module:

This module adds the ability for site admins to add "Markup" widgets to the form. These essentially let designers of cck content-types insert additional markup into the node/edit form to display to content-authors. This is the equivalent of adding additional elements to $form of the type '#markup'.

0

There is in built functionality in Drupal core to do precisely what you are trying to do. Here is how to go about it. Refer the images to follow the steps.

  1. Navigate to your Content Type / Node Type and click on 'manage fields'.
  2. Click 'Edit' link against each field.
  3. In the field edit form that shows up, enter what is called the 'HELP TEXT' and enter instructions for the user that are related to the particular field.
  4. You can use reasonable amount of HTML in your instructions.
  5. Save your field changes.

How to add help text for a node form field in Drupal

Now when you visit the node/add form you would shown the help text alongside your respective fields, as shown below. You can add JS/CSS in your theme to change the display of the help text as desired.

enter image description here

  • I know I can do that. The problem is I need something like separate field that I could style independently and place it for example in form's header. – SiliconMind Feb 18 '14 at 21:35
  • For the node/add form you can place instructions in the form header by adding Help Text for the entire content type (different from help text for each fields) from the edit page of the content type. – Sumeet Pareek Feb 19 '14 at 5:03
  • @SiliconMind But if you have more advanced needs, you could use the markup module as pointed out in one of the comments, or custom alter your forms. – Sumeet Pareek Feb 19 '14 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.