You are here

private function wf_crm_admin_form::addDynamicCustomSetting in Webform CiviCRM Integration 7.4

Same name and namespace in other branches
  1. 7.5 includes/wf_crm_admin_form.inc \wf_crm_admin_form::addDynamicCustomSetting()

Parameters

$fieldset:

$set:

$ent:

$n:

5 calls to wf_crm_admin_form::addDynamicCustomSetting()
wf_crm_admin_form::buildActivityTab in includes/wf_crm_admin_form.inc
Activity settings
wf_crm_admin_form::buildCaseTab in includes/wf_crm_admin_form.inc
Case settings FIXME: This is exactly the same code as buildGrantTab. More utilities and less boilerplate needed.
wf_crm_admin_form::buildContactTab in includes/wf_crm_admin_form.inc
Build fields for a contact
wf_crm_admin_form::buildContributionTab in includes/wf_crm_admin_form.inc
Contribution settings
wf_crm_admin_form::buildGrantTab in includes/wf_crm_admin_form.inc
Grant settings FIXME: This is nearly the same code as buildCaseTab. More utilities and less boilerplate needed.

File

includes/wf_crm_admin_form.inc, line 592
Webform CiviCRM module's admin form.

Class

wf_crm_admin_form
@file Webform CiviCRM module's admin form.

Code

private function addDynamicCustomSetting(&$fieldset, $set, $ent, $n) {
  if (strpos($set, 'cg') === 0) {
    $fieldset["{$ent}_{$n}_settings_dynamic_custom_{$set}"] = array(
      '#type' => 'checkbox',
      '#title' => ts('Add dynamically'),
      '#default_value' => wf_crm_aval($this->data, "{$ent}:{$n}:dynamic_custom_{$set}"),
      '#weight' => -1,
      '#prefix' => '<div class="dynamic-custom-checkbox">',
      '#suffix' => '</div>',
    );
    $this
      ->help($fieldset["{$ent}_{$n}_settings_dynamic_custom_{$set}"], 'dynamic_custom');
  }
}