function _acquia_lift_page_goal_create_form in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 acquia_lift.admin.unibar.inc \_acquia_lift_page_goal_create_form()
Loads the page goals selection form for a campaign.
Parameters
$agent: The agent data for the campaign that this goal will belong to.
2 calls to _acquia_lift_page_goal_create_form()
- acquia_lift_goal_type_create_form in ./
acquia_lift.admin.unibar.inc - Form builder function to create a new goal in the modal process of a specific type.
- acquia_lift_personalize_campaign_wizard_goals_alter in ./
acquia_lift.admin.wizard.inc - Alter the goals form.
File
Code
function _acquia_lift_page_goal_create_form($agent) {
$form['actionable_element'] = array(
'#type' => 'value',
'#value' => 'page',
);
$form['title'] = array(
'#title' => t('Title'),
'#type' => 'textfield',
'#required' => TRUE,
'#attributes' => array(
'placeholder' => t('Example: Purchases any item'),
),
);
// To be filled in on the client-side.
$form['pages'] = array(
'#type' => 'hidden',
);
// Needed by the visitor actions form for structure.
$form['event'] = array(
'#tree' => TRUE,
);
$form['options'] = array(
'#tree' => TRUE,
);
$form['#element_validate'][] = '_acquia_lift_page_goal_create_form_validate';
module_load_include('inc', 'visitor_actions', 'visitor_actions.admin');
visitor_actions_get_form_options('page', $form, FALSE);
return $form;
}