You are here

function _civicrm_entity_price_set_field_setup_event_thank_you_page_fapi in CiviCRM Entity 7.2

Helper function to setup thank you page FAPI

_state

Parameters

$form:

1 call to _civicrm_entity_price_set_field_setup_event_thank_you_page_fapi()
civicrm_entity_price_set_field_display_form_event in modules/civicrm_entity_price_set_field/includes/civicrm_entity_price_set_field.event_registration.inc
Form callback for event registration form

File

modules/civicrm_entity_price_set_field/includes/civicrm_entity_price_set_field.thank_you_page.inc, line 14
CiviCRM Entity Price Set Field, Thank You page generation

Code

function _civicrm_entity_price_set_field_setup_event_thank_you_page_fapi(&$form, &$form_state) {
  $form['thank_you_page'] = array(
    '#type' => 'container',
    '#attributes' => array(
      'class' => array(
        'civicrm-entity-price-set-field-thank-you-page',
      ),
    ),
  );
  $markup = theme('civicrm_entity_price_set_field_price_field_display_form_thank_you_page', array(
    'form_data' => $form_state['storage']['registration_form'],
    'civicrm_event',
    'entity' => $form_state['event'],
    'price_set_data' => $form_state['price_set_data'],
    'heading' => !empty($form_state['event']->confirm_title) ? $form_state['event']->thankyou_title : 'Thank You Page',
    'profiles' => $form_state['profiles'],
  ));
  $form['thank_you_page']['message'] = array(
    '#type' => 'markup',
    '#markup' => $markup,
  );
}