You are here

function _acquia_lift_page_goal_create_form in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 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.

1 call 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.

File

./acquia_lift.admin.unibar.inc, line 1238
acquia_lift.admin.unibar.inc

Code

function _acquia_lift_page_goal_create_form($agent) {
  $form['actionable_element'] = array(
    '#type' => 'value',
    '#value' => 'page',
  );
  $form['title'] = array(
    '#title' => t('Title'),
    '#description' => t('Name'),
    '#type' => 'textfield',
    '#required' => TRUE,
  );

  // 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['#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;
}