function field_tools_textarea in Field tools 7
Build a Form API textarea element to use for import/export.
Parameters
string $label: The translated label for the textarea element.
string $value: (optional) The code to show in the text area.
Return value
array A Form API textarea element.
4 calls to field_tools_textarea()
- field_tools_bundle_export_form in ./
field_tools.admin.inc - Form to export all fields of a bundle.
- field_tools_bundle_import_form in ./
field_tools.admin.inc - Import fields into a bundle.
- field_tools_field_export_form in ./
field_tools.admin.inc - Form to export a single field instance.
- field_tools_group_export_form in ./
field_tools.admin.inc - Form to export a single group.
File
- ./
field_tools.admin.inc, line 1385 - Contains admin callbacks for the Field tools module.
Code
function field_tools_textarea($label, $value = NULL) {
$textarea = array(
'#type' => 'textarea',
'#title' => $label,
'#rows' => 40,
);
if ($value === NULL) {
$textarea['#default_value'] = '';
}
else {
$textarea['#value'] = $value;
}
return $textarea;
}