function _webform_conditional_remove_expand in Webform 7.4
Helper. Generate the add_subconditional (+), add + or remove - button.
2 calls to _webform_conditional_remove_expand()
- _webform_conditional_expand in includes/
webform.conditionals.inc - Form API #process function to expand a webform conditional element.
- _webform_conditional_rule_expand in includes/
webform.conditionals.inc - Helper. Generate form elements for one rule.
File
- includes/
webform.conditionals.inc, line 493 - Form elements and menu callbacks to provide conditional handling in Webform.
Code
function _webform_conditional_remove_expand($element, $rid) {
return array(
'#type' => 'submit',
'#value' => t('-'),
'#submit' => array(
'webform_conditional_element_remove',
),
'#name' => implode('_', $element['#parents']) . '_rules_' . $rid . '_remove',
'#attributes' => array(
'class' => array(
'webform-conditional-rule-remove',
),
),
'#ajax' => array(
'progress' => 'none',
'callback' => 'webform_conditional_element_ajax',
'wrapper' => $element['#wrapper_id'],
'event' => 'click',
),
);
}