Skip to content

Instantly share code, notes, and snippets.

View JeffTomlinson's full-sized avatar

Jeff Tomlinson JeffTomlinson

View GitHub Profile
@JeffTomlinson
JeffTomlinson / example_entity_form_extract_element.php
Last active August 29, 2015 14:26
Extract Drupal 7 form API elements from and existing entity form
/**
* Extracts a form API element from and existing entity form.
*
* @param string $field_name
* The field name of the element to extract.
* @param string $form_id
* The form ID of the entity form from which to extract the element.
* @param string $entity_type
* The entity type fo the entity form.
* @param string $bundle_name