function ddblock_mapping_display_form in Dynamic display block 7
Helper function to define populated form field elements for album track node form.
1 call to ddblock_mapping_display_form()
- ddblock_form_alter in ./
ddblock.module - Implements hook_form_alter().
File
- ./
ddblock.module, line 2761 - Enables your site to display dynamic content in a block.
Code
function ddblock_mapping_display_form($delta, $target, $source, $source_fields) {
$form = array(
'#tree' => TRUE,
);
$form['target'] = array(
'#type' => 'textfield',
'#title' => t('Target'),
'#weight' => 1,
'#size' => 20,
'#parents' => array(
'block_settings',
'mapping_wrapper',
'mappings',
$delta,
'target',
),
'#default_value' => $target,
'#prefix' => '<div class="ddblock-target">',
'#suffix' => '</div>',
);
$form['source'] = array(
'#type' => 'select',
'#title' => t('Source'),
'#weight' => 2,
'#parents' => array(
'block_settings',
'mapping_wrapper',
'mappings',
$delta,
'source',
),
'#default_value' => $source,
'#size' => 1,
'#options' => $source_fields,
'#prefix' => '<div class="ddblock-source">',
'#suffix' => '</div>',
);
return $form;
}