* @return void
*/
public static function buildQuickForm(&$form) {
- $form->addElement('hidden', 'modified_date', '', array('id' => 'modified_date'));
+ $form->addField('modified_date', array('type' => 'hidden', 'id' => 'modified_date', 'label' => ''));
}
/**
*/
public $_contactSubType;
+ /**
+ * Explicitly declare the form context.
+ */
+ public function getDefaultContext() {
+ return 'create';
+ }
+
+ /**
+ * Explicitly declare the entity api name.
+ */
+ public function getDefaultEntity() {
+ return 'Contact';
+ }
+
/**
* Common preprocess: fetch contact ID and contact type
*/
// - V1:open E1:open E1:submit V1.email:open V1.email:submit
// - V1:open V1.email:open E1:open E1:submit V1.email:submit V1:lock
$timestamps = CRM_Contact_BAO_Contact::getTimestamps($contactID);
- $form->addElement('hidden', 'oplock_ts', $timestamps['modified_date'], array('id' => 'oplock_ts'));
+ $form->addField('oplock_ts', array('type' => 'hidden', 'id' => 'oplock_ts', 'label' => $timestamps['modified_date']));
$form->addFormRule(array('CRM_Contact_Form_Inline_Lock', 'formRule'), $contactID);
}
$this->addElement('text', $name, $label, $props, $required);
break;
+ case 'hidden':
+ $this->addElement('hidden', $name, $label, $props);
+ break;
+
//case 'TextArea':
//case 'Select Date':
//TODO: Add date formats