3

Is is possible to insert user-editable text as a form component?

I would need some custom text between the "email" and "name" fields. How do I achieve this?

11

Assuming you are talking about the Webform module, you can create an element with type of "markup". There are a few options for this, including input format. If you have everything configured properly, you can use a WYSIWYG editor on the fields, too.

If you are using the Form API, then you can use #type = "markup"; to put pretty much whatever HTML you want in your custom form.

1

In Drupal 8, you now have Markup elements you can look for by Category when adding elements to your webform. This is confusing at first since the markup element is no longer called so in the Drupal 8 version.

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.