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?

2 Answers 2


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.


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 and acknowledge you have read our privacy policy.

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