Assume I have a user registration form with a select box widget. This select box should be shown in the user account, but on the user registration for, I need it to be a checkbox.

What can I do to alter the widget type for a specific form?
(For this case, assume my field can be select/checkbox built-in. It's just about switching between its existing widget types.)

Any suggestions would be welcome!

Comments

Anonymous’s picture

I think I'm looking for a
hook_field_widget_form_alter

There's a D8 solution in the loop, http://drupal.org/node/1204230

What is the D7 workaround?

xjm’s picture

#1: The D8 patch will likely be backported to D7 as well.

xjm’s picture

Status: Active » Closed (duplicate)