private function wf_crm_admin_form::buildFormIntro in Webform CiviCRM Integration 7.4
Same name and namespace in other branches
- 7.5 includes/wf_crm_admin_form.inc \wf_crm_admin_form::buildFormIntro()
Build fields for form intro
1 call to wf_crm_admin_form::buildFormIntro()
- wf_crm_admin_form::buildForm in includes/
wf_crm_admin_form.inc - Build admin form for civicrm tab of a webform
File
- includes/
wf_crm_admin_form.inc, line 171 - Webform CiviCRM module's admin form.
Class
- wf_crm_admin_form
- @file Webform CiviCRM module's admin form.
Code
private function buildFormIntro() {
$this->form['nid'] = array(
'#type' => 'checkbox',
'#title' => t('Enable CiviCRM Processing'),
'#default_value' => !empty($this->settings['nid']),
'#return_value' => $this->node->nid,
);
$this
->help($this->form['nid'], 'intro', t('Webform-CiviCRM Integration'));
$this->form['number_of_contacts'] = array(
'#type' => 'select',
'#title' => t('Number of Contacts'),
'#default_value' => count($this->data['contact']),
'#options' => drupal_map_assoc(range(1, 30)),
);
$this->form['change_form_settings'] = array(
'#type' => 'button',
'#value' => t('Change Form Settings'),
'#prefix' => '<div id="no-js-button-wrapper" class="messages warning">',
'#suffix' => '<div>' . t('You have Javascript disabled. You will need to click this button after changing any option to see the result.') . '</div></div>',
);
$this->form['webform_civicrm'] = array(
'#type' => 'vertical_tabs',
);
// Display intro help to virgins
if (!variable_get('webform_civicrm_help_seen')) {
variable_set('webform_civicrm_help_seen', TRUE);
drupal_add_js('cj(function() {CRM.help("' . t('Welcome to Webform-CiviCRM') . '", {}, "' . url('webform-civicrm/help/intro') . '");});', array(
'type' => 'inline',
'scope' => 'footer',
));
}
}