function editableviews_handler_field_entity_metadata_property::edit_form_element_textfield in Editable Views 7
Create a textfield element.
Parameters
&$element: The element to alter.
&$form_state: The form state.
$wrapper: The wrapper for the entity whose property is to be shown in the element.
1 call to editableviews_handler_field_entity_metadata_property::edit_form_element_textfield()
- editableviews_handler_field_entity_metadata_property::edit_form in handlers/
editableviews_handler_field_entity_metadata_property.inc - Add the edit form for the field.
File
- handlers/
editableviews_handler_field_entity_metadata_property.inc, line 204
Class
- editableviews_handler_field_entity_metadata_property
- Field handler for editing an entity metadata property.
Code
function edit_form_element_textfield(&$element, &$form_state, $wrapper) {
// Just do the same thing as node_content_form().
$element[$this->options['property']] = array(
'#type' => 'textfield',
'#required' => !empty($this->property_info['required']),
// The value might not be set in the case where we're on a non-required
// relationship with empty data. TODO???
'#default_value' => $wrapper->{$this->options['property']}
->raw(),
//'#size' => $this->options['textfield_size'],
'#maxlength' => 255,
);
}