This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_views_api(). | |
* Used for enabling using templates inside my module. | |
*/ | |
function ModuleName_views_api() { | |
return array( "version" => "3.0", "template path" => drupal_get_path('module','ModuleName') . '/templates' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$form = new Entityform(array('type' = 'my_entitty_form', 'language' => LANGUAGE_NONE)); | |
$form->field_entityform_1 = array(LANGUAGE_NONE => array(array('value' => 'field_1'))); | |
$form->field_entityform_2 = array(LANGUAGE_NONE => array(array('value' => 'field_2' ))); | |
$form->uid = 1; // this is the form id | |
entityform_save($form); |