function fieldgroup_skinr_form_index_handler in Skinr 6.2
Skinr form index handler.
Parameters
$op: What kind of action is being performed. Possible values:
- "form": the form elements for Skinr are being inserted in a form
- "submit": the form has been submitted.
&$form:
- For "form", passes in the $form parameter from hook_form_alter().
- For "submit", passes in the $form parameter from hook_form_submit().
$form_state:
- For "form", passes in the $form_state parameter from hook_form_alter().
- For "submit", passes in the $form_state parameter from hook_form_submit().
Return value
The index where we can find our values in Skinrs data structure.
Related topics
1 string reference to 'fieldgroup_skinr_form_index_handler'
- fieldgroup_skinr_config in modules/
fieldgroup.skinr.inc - Implementation of hook_skinr_config().
File
- modules/
fieldgroup.skinr.inc, line 55 - Provide skinr handling for fieldgroup.module
Code
function fieldgroup_skinr_form_index_handler($op, &$form, $form_state) {
switch ($op) {
case 'form':
// Fix weights for this form to have the proper order of elements.
$form['submit']['#weight'] = 50;
return $form['group_name']['#default_value'] . '_' . $form['#content_type']['type'];
case 'submit':
return $form_state['values']['group_name'] . '_' . $form['#content_type']['type'];
}
}