function getlocations_fields_element_php_code in Get Locations 7.2
Same name and namespace in other branches
- 7 modules/getlocations_fields/getlocations_fields.functions.inc \getlocations_fields_element_php_code()
Parameters
string $default:
bool $ctools:
Return value
Returns form element
3 calls to getlocations_fields_element_php_code()
- getlocations_fields_handler_field_distance::extra_options_form in modules/
getlocations_fields/ handlers/ getlocations_fields_handler_field_distance.inc - Provide a form for setting options.
- getlocations_fields_handler_filter_distance::value_form in modules/
getlocations_fields/ handlers/ getlocations_fields_handler_filter_distance.inc - Options form subform for setting options.
- getlocations_fields_handler_sort_distance::extra_options_form in modules/
getlocations_fields/ handlers/ getlocations_fields_handler_sort_distance.inc - Provide a form for setting options.
File
- modules/
getlocations_fields/ getlocations_fields.functions.inc, line 159 - getlocations_fields.functions.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_fields_element_php_code($default, $ctools = TRUE) {
$element = array(
'#type' => 'textarea',
'#title' => t('PHP code for latitude, longitude'),
'#default_value' => $default,
'#description' => t("Enter PHP code that returns a latitude/longitude. Do not use <?php ?>. You must return only an array with float values set for the 'latitude' and 'longitude' keys."),
);
if ($ctools) {
$element['#dependency'] = array(
'edit-options-origin' => array(
'php',
),
);
}
return $element;
}