You are here

function acquia_lift_personalize_campaign_wizard_blocks_add in Acquia Lift Connector 7.2

Submit handler to add another block option to a personalized block form.

1 string reference to 'acquia_lift_personalize_campaign_wizard_blocks_add'
_acquia_lift_personalize_campaign_wizard_variations_block in ./acquia_lift.admin.wizard.inc
Generate the blocks portion of the campaign wizard form.

File

./acquia_lift.admin.wizard.inc, line 1563
acquia_lift.admin.wizard.inc Functions specific to the Acquia Lift alteration of the campaign creation wizard.

Code

function acquia_lift_personalize_campaign_wizard_blocks_add($form, &$form_state) {

  // Value will be "blocks_add" or "blocks_{osid}" where the second part is the
  // key within the form state storage for the number of blocks to generate.
  list($blocks, $key) = explode('_', $form_state['triggering_element']['#value']);
  if ($key === 'add') {
    $key = 'add_' . _acquia_lift_personalize_campaign_wizard_next_element($form_state, 'new');
  }
  $form_state['option_set_num_blocks'][$key]++;
  $form_state['rebuild'] = TRUE;
}