The Webform module prevents certain components from having their title display option set to "inline", but the same restrictions aren't enforced by the Form Builder integration module.

The effect is that with Form Builder you can configure e.g. a textarea to have its title display inline, which doesn't work (and which breaks resizable textareas too).

This patch makes it so that the correct options are shown for the title display. It also adds the correct title display options to fieldsets (which previously did not allow you to configure the title display at all, even though you should at least be able to mark the title hidden).

Comments

quicksketch’s picture

Fantastic, thanks David.

David_Rothstein’s picture

Title: Webform integration does not show correct title display options for textareas, grids and fieldsets » Webform integration does not show correct title display options for textareas or grids
StatusFileSize
new1.9 KB

Hm, it turns out that the title display setting on fieldsets doesn't work correctly with this patch. I think it's because Webform handles title displays in a special way for fieldsets, but haven't had time to actually track it down.

So here's a new patch that removes that part; it's kind of a separate issue anyway, and the rest of the patch works well as is.

bowersox’s picture

sub

quicksketch’s picture

Although Webform utilizes the core #title_display option, I think this might be a good situation to just pull the form directly from Webform, the same way that we pull options for some of the more advanced webform components. Then components can provide their own title display options. This deep property checking seems very likely to break in the future.

quicksketch’s picture

Status: Needs review » Fixed

Ah well, for now we'll go with this. Committed.

quicksketch’s picture

This patch has been rolled back due to the new approach in #1405858: Rewrite Webform integration to use new mapping hooks that makes it unnecessary. The title_display options are pulled directly from Webform's component configuration now, rather than attempting to modify Form Builder's title_display options.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.