I wanted to put some "subfields" in the right region but found it was not possible with the current code (maybe I missed that option ). But in fact it took 3 lines of code to make it possible ( was 2 before ), and I think this option can become quiet useful.

With that patch it's possible to do things like that:

function mycustom_module_form_alter(&$form, &$form_state, $form_id) {
$form["my_extra_field"]['#placement'] = array(
    'region' => 'right',
    'weight' => 3,
    'has_required' => FALSE,
    'hidden' => FALSE,

Things that become possible in hook_form_alter() with this:

  1. Assign region to form elements
  2. Move fields depending of the user role
  3. Move subfields :)
  4. ...
modules_assign_region.patch565 bytesidflood


pragnatek’s picture

Great patch, thanks for contributing.
I'm finding this very useful as my node forms are already greatly altered by using the inline_registration module and other customisations.

bachbach’s picture

thanks for this great simple patch.
Is this will be committed ?