field_attach_form

  1. drupal
    1. drupal7
Versionen
drupal7 field_attach_form($obj_type, $object, &$form, $form_state)

Add form elements for all fields for an object to a form structure.

Übergabeparameter

$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.

Verwandte Themen

▾ 6 functions call field_attach_form()

FieldAttachTestCase::testFieldAttachForm in modules/field/field.test
FieldAttachTestCase::testFieldAttachSubmit in modules/field/field.test
field_test_entity_form in modules/simpletest/tests/field_test.module
Form to set the value of fields attached to our entity.
node_form in modules/node/node.pages.inc
Generate the node add/edit form array.
user_profile_form in modules/user/user.pages.inc
Form builder; edit a user account or one of their profile categories.
user_save in modules/user/user.module
Save changes to a user account or add a new user.

Code

modules/field/field.autoload.inc, line 34

<?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

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen