In _webform_render_markup the #input_format key is filled with the value of $component['extra']['format']. This causes an issue, specifically in conjunction with form_builder where the form to edit the markup component doesn't reflect the saved format state. form_builder expects a #format key due to the way that other text_format elements are setup. The key is not set in _webform_render_markup so the form_builder form always reverts to the default.
To observe this issue, create a webform and add a markup component using form_builder that uses a non-default text format. Save the form_builder form and re-open the markup components edit form. Note that the markup component has reverted to the default text format. This is also a problem if you open the webform and save the components without altering them individually. The value of the markup element's format will have reverted without being touched.
This patch simply renames the array key to #format.
| Comment | File | Size | Author |
|---|---|---|---|
| 0001-Rename-the-input_format-key-to-just-format-in-markup.patch | 1.09 KB | james.elliott |
Comments
Comment #1
quicksketchThanks, yeah at the time Form Builder was written it was #input_format in core, and was renamed to #format later.
Comment #2
quicksketchThanks committed to 3.x branches.