Pull merge.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / field_attach_form.twig
1 /**
2  * Implements hook_field_attach_form().
3  */
4 function {{ machine_name }}_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
5   // Add a checkbox allowing a given field to be emptied.
6   // See hook_field_attach_submit() for the corresponding processing code.
7   $form['empty_field_foo'] = array(
8     '#type' => 'checkbox',
9     '#title' => t("Empty the 'field_foo' field"),
10   );
11 }