I'm working on a patch to correct two things. First, our component names are not properly translated anywhere. That is, rather than individually calling t('select'), t('grid'), etc, we just have a single t($name), which makes it possible to translate but is not very friendly.

The second problem is that the "select" type does not indicate that it can also make radio buttons and check boxes. The select.inc file should provide not one label, but 3: Select list, Radio buttons, and Check boxes.

Both of these problems I'm trying to solve with a new webform "hook", _webform_info_[type](). This will replace the funky and not very useful _webform_help_[type]() function, since we can provide not just a translated label but also the description.

This patch only partially works. It creates the new hook and defines all the data, but it can't yet provide multiple component types from a single include file.

CommentFileSizeAuthor
webform_types.patch18.02 KBquicksketch

Comments

quicksketch’s picture

Status: Needs work » Closed (fixed)

I ended up fixing this in a new unified hook in webform.module. See #340241: Provide hook_webform_component_info() to allow 3rd-party components. The select.inc file providing Radio buttons, Select lists, and Checkboxes will eventually be handled by the Form Builder integration, which fixes it in a completely different manner.