You are here

private function wf_crm_admin_form::isNewFieldset 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::isNewFieldset()

Is this a new entity being added to the form?

If so, create a new fieldset for them. Otherwise only use an existing one if it exists. This way we respect the user's choice and don't add a fieldset if they've already deleted it.

Parameters

$field_key:

Return value

bool

1 call to wf_crm_admin_form::isNewFieldset()
wf_crm_admin_form::postProcess in includes/wf_crm_admin_form.inc
Submission handler, saves CiviCRM options for a Webform node

File

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

Class

wf_crm_admin_form
@file Webform CiviCRM module's admin form.

Code

private function isNewFieldset($field_key) {
  list(, $c, $ent) = wf_crm_explode_key($field_key);
  $type = in_array($ent, self::$fieldset_entities) ? $ent : 'contact';
  return !isset($this->node->webform_civicrm['data'][$type][$c]);
}