2 * Implements hook_field_attach_form().
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(
9 '#title' => t("Empty the 'field_foo' field"),