Nest a Field Widget's primary field in a Fieldset array I'm porting over some logic that's working on a custom form to a new field widget; however, due to some javascript logic the custom form needs the end field to be nested within other elements, but when I try to nest the element in the widget, the value is not sent through the form.
Forcing a name attribute like I do below doesn't seem to help.

$element['filter']['client_selector'] = array(
    '#title'=&gt;'Your Clients',
    '#type'=&gt;'fieldset',
    '#theme'=&gt;'mymodule_option_selector',
    '#list'=&gt;$client_selector
);  
$element['filter']['client_selector']['tid'] = array(
    '#type' =&gt; 'hidden',
    '#default_value' =&gt; $selected_client,
    '#attributes'=&gt;array('class'=&gt;array('hidden-value'),
        'name'=&gt;$instance['field_name'] . '[' . $langcode . '][' . $delta . '][tid]'),
);


This works to send the value, but not with the selector system

$element['tid'] = array(
    '#type' =&gt; 'hidden',
    '#default_value' =&gt; $selected_client,
    '#attributes'=&gt;array('class'=&gt;array('hidden-value')),
);


Thanks!
I ended-up just adding a submit and validation callback that re-aligned the index.

In the hook_field_widget_form

function mymodule_field_widget_form(&amp;$form, &amp;$form_state, $field, $instance, $langcode, $items, $delta, $element) {
//  widget form logic....

//  Add a custom submit handler to realign the values
    $form['#submit'][] = 'mymodule_option_selector_submit_validate';
    $form['#validate'][] = 'mymodule_option_selector_submit_validate';

//  Tell the form what field uses the option selector so it knows which fields to relign        
    if(!isset($form['#option_selector_fields']))
        $form['#option_selector_fields'] = array();
    $form['#option_selector_fields'][] = array(
        'field_name'=&gt;$instance['field_name'],
        'langcode'=&gt;$langcode,
        'delta'=&gt;$delta,
        'columns'=&gt;$element['#columns'],
    );

    return $element;

}

function mymodule_option_selector_submit_validate($form, &amp;$form_state){
    if(isset($form['#option_selector_fields'])){
        foreach($form['#option_selector_fields'] as $field_data){
            foreach($field_data['columns'] as $column)
                $form_state['values'][$field_data['field_name']][$field_data['langcode']][$field_data['delta']][$column] = 
                        $form_state['values'][$field_data['field_name']][$field_data['langcode']][$field_data['delta']]['filter']['client_selector'][$column];      
        }
    }
}


Still would be nice to know if there is some kind of toggle in the widget form system to accommodate this.