| Versionen | |
|---|---|
| drupal7 | field_attach_form($obj_type, $object, &$form, $form_state) |
Add form elements for all fields for an object to a form structure.
$obj_type The type of $object; e.g. 'node' or 'user'.
$object The object for which to load form elements, used to initialize default form values.
$form The form structure to fill in.
$form_state An associative array containing the current state of the form.
TODO : document the resulting $form structure, like we do for field_attach_view().
This function is an autoloader for _field_attach_form() in modules/field/field.attach.inc.
modules/
<?php
function field_attach_form($obj_type, $object, &$form, $form_state) {
require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
return _field_attach_form($obj_type, $object, $form, $form_state);
}
?>
Kommentare
Kommentar hinzufügen