function noderefcreate_widget_settings in Node Reference Create 6
File
- ./
noderefcreate.module, line 17
Code
function noderefcreate_widget_settings($op, $widget) {
switch ($op) {
case 'form':
$form = array();
$match = isset($widget['autocomplete_match']) ? $widget['autocomplete_match'] : 'contains';
if ($widget['type'] == 'noderefcreate_autocomplete') {
$form['autocomplete_match'] = array(
'#type' => 'select',
'#title' => t('Autocomplete matching'),
'#default_value' => $match,
'#options' => array(
'starts_with' => t('Starts with'),
'contains' => t('Contains'),
),
'#description' => t('Select the method used to collect autocomplete suggestions. Note that <em>Contains</em> can cause performance issues on sites with thousands of nodes.'),
);
}
else {
$form['autocomplete_match'] = array(
'#type' => 'hidden',
'#value' => $match,
);
}
return $form;
case 'save':
return array(
'autocomplete_match',
);
}
}