function form($instance)
 {
     $defaults = array('title' => epl__('Events'));
     $instance = wp_parse_args((array) $instance, $defaults);
     $title = $instance['title'];
     $title_url = $instance['title_url'];
     $css_class = $instance['css_class'];
     $num_events_to_show = $instance['num_events_to_show'];
     $exclude_event_ids = $instance['exclude_event_ids'];
     $enable_tooltip = $instance['enable_tooltip'];
     $template = $instance['template'];
     $thumbnail_size = $instance['thumbnail_size'];
     $class_display_type = epl_get_element('class_display_type', $instance);
     $num_words_to_show = epl_get_element('num_words_to_show', $instance);
     $content_to_show = epl_get_element('content_to_show', $instance);
     $days_to_show = $instance['days_to_show'];
     $tax_filter = $instance['tax_filter'];
     $tax_filter_field = $this->get_field_name('tax_filter');
     //send name and value
     $args = array('name' => $tax_filter_field . '[]', 'value' => $tax_filter);
     $r = $this->epl->epl_util->epl_terms_field($args);
     $data = array();
     //send the checkbox array as a separate var
     $data['tax_filter'] = $r['field'];
     $_f = array('input_type' => 'select', 'input_name' => $this->get_field_name('enable_tooltip'), 'options' => epl_yes_no(), 'value' => $enable_tooltip);
     $r = $this->epl->epl_util->create_element($_f);
     $data['enable_tooltip'] = $r['field'];
     $_f = array('input_type' => 'select', 'input_name' => $this->get_field_name('class_display_type'), 'options' => array(1 => epl__('First Date Only'), 2 => epl__('Each Date Individually')), 'value' => $class_display_type);
     $r = $this->epl->epl_util->create_element($_f);
     $data['class_display_type'] = $r['field'];
     $template_options = apply_filters('epl_ue_available_templates', array('template-1' => epl__('Template 1'), 'template-2' => epl__('Template 2'), 'template-1-loc' => epl__('Template 1 + location'), 'template-2-loc' => epl__('Template 2 + location')));
     $_f = array('input_type' => 'select', 'input_name' => $this->get_field_name('template'), 'options' => $template_options, 'value' => $template);
     $r = $this->epl->epl_util->create_element($_f);
     $data['template'] = $r['field'];
     $_f = array('input_type' => 'select', 'input_name' => $this->get_field_name('thumbnail_size'), 'options' => get_intermediate_image_sizes(), 'value' => $thumbnail_size);
     $r = $this->epl->epl_util->create_element($_f);
     $data['thumbnail_size'] = $r['field'];
     $_f = array('input_type' => 'select', 'input_name' => $this->get_field_name('content_to_show'), 'options' => array('content' => epl__('Content'), 'excerpt' => epl__('Excerpt')), 'value' => $content_to_show);
     $r = $this->epl->epl_util->create_element($_f);
     $data['content_to_show'] = $r['field'];
     $data += $instance;
     $data['w'] = $this;
     $this->epl->load_view('widgets/upcoming-events/form', $data);
 }
<?php

global $epl_fields;
$epl_fields['epl_fields'] = array('input_name' => array('input_type' => 'hidden', 'input_name' => 'input_name'), 'label' => array('input_type' => 'text', 'input_name' => 'label', 'label' => 'Field Label', 'description' => epl__('Will be used in the field label.'), 'required' => true, 'class' => 'epl_w300'), 'input_slug' => array('input_type' => 'text', 'input_name' => 'input_slug', 'label' => epl__('Input Slug'), 'description' => epl__('Will be used in email templates. Ex. your_city, your_weight, height...'), 'required' => true, 'class' => 'epl_w300 input_name'), 'input_type' => array('input_type' => 'select', 'input_name' => 'input_type', 'options' => array('text' => 'Text', 'textarea' => 'Textarea', 'select' => 'Dropdown', 'radio' => 'Radio', 'checkbox' => 'Checkbox', 'hidden' => 'Hidden'), 'id' => 'input_type', 'label' => 'Field Type', 'description' => '', 'style' => '', 'class' => 'epl_field_type', 'default_value' => 'text'), 'epl_field_choices' => array('input_type' => 'section', 'class' => 'epl_field_choices'), 'epl_field_choice_default' => array('return' => 0, 'input_name' => 'epl_field_choice_default[]'), 'epl_field_choice_text' => array('return' => 0, 'input_name' => 'epl_field_choice_text[]'), 'epl_field_choice_value' => array('return' => 0, 'input_name' => 'epl_field_choice_value[]'), 'description' => array('input_type' => 'textarea', 'input_name' => 'description', 'label' => 'Field Description', 'description' => epl__('Will be displayed below the field.  Can be used as help text.'), 'class' => 'epl_w300'), 'required' => array('input_type' => 'select', 'input_name' => 'required', 'label' => 'Required', 'options' => epl_yes_no(), 'default_value' => 0, 'display_inline' => true), 'default_value' => array('input_type' => 'text', 'input_name' => 'default_value', 'label' => 'Default Value', 'description' => epl__('Default value for the field, ONLY FOR Text, Hidden, Textarea (for now).'), 'class' => 'epl_w300'), 'validation' => array('input_type' => 'select', 'input_name' => 'validation', 'options' => array('email' => 'Email'), 'empty_row' => true, 'id' => 'input_type', 'label' => 'Validation', 'description' => epl__('More Coming Soon.'), 'style' => '', 'class' => 'epl_field_type', 'default_value' => 'text'), 'epl_controller' => array('input_type' => 'hidden', 'input_name' => 'epl_controller', 'default_value' => 'epl_form_manager'), 'epl_system' => array('input_type' => 'hidden', 'input_name' => 'epl_system', 'value' => 1));
$epl_fields['epl_fields_choices'] = array('epl_field_choice_text' => array('input_type' => 'text', 'input_name' => 'epl_field_choice_text[]'), 'epl_field_choice_value' => array('input_type' => 'text', 'input_name' => 'epl_field_choice_value[]'));
$epl_fields['epl_forms'] = array('epl_form_id' => array('input_type' => 'hidden', 'input_name' => 'epl_form_id'), 'epl_form_label' => array('input_type' => 'text', 'input_name' => 'epl_form_label', 'id' => 'epl_form_label', 'label' => 'Form Label', 'description' => 'Displayed form identifier', 'class' => 'epl_w300', 'required' => true), 'epl_form_slug' => array('input_type' => 'text', 'input_name' => 'epl_form_slug', 'label' => 'Form Slug', 'description' => epl__('Will be used in emails.'), 'class' => 'epl_w300 make_slug', 'required' => true), 'epl_form_descritption' => array('input_type' => 'textarea', 'input_name' => 'epl_form_descritption', 'label' => 'Form Description', 'description' => 'If you would like to give some form instructions, you can type them here. ', 'class' => 'epl_w300'), 'epl_form_options' => array('input_type' => 'checkbox', 'input_name' => 'epl_form_options[]', 'label' => 'On the registration form:', 'description' => '', 'options' => array(0 => 'Show Form Name.', 10 => 'Show Form Description.'), 'class' => ''), 'epl_form_fields' => array('return' => 0, 'input_name' => 'epl_form_fields'), 'epl_controller' => array('input_type' => 'hidden', 'input_name' => 'epl_controller', 'default_value' => 'epl_form_manager'), 'epl_system' => array('input_type' => 'hidden', 'input_name' => 'epl_system', 'value' => 1));
<?php

global $epl_fields;
$epl_fields['epl_global_discount_type'] = array('_epl_global_discount_type' => array('input_type' => 'select', 'input_name' => '_epl_global_discount_type', 'label' => epl__('Discount Type'), 'id' => 'epl_global_discount_type', 'empty_row' => true, 'options' => array('global' => epl__('Internal'))));
$epl_fields['epl_global_discount_type'] = apply_filters('epl_global_discount_type', $epl_fields['epl_global_discount_type']);
$epl_fields['epl_global_discount_fields'] = array('_epl_discount_method' => array('input_type' => 'select', 'input_name' => '_epl_discount_method[]', 'options' => array(5 => epl__('Code'), 10 => epl__('Automatic')), 'label' => epl__('Discount Method'), 'class' => '', 'parent_keys' => true), '_epl_discount_code' => array('input_type' => 'text', 'input_name' => '_epl_discount_code[]', 'label' => epl__('Discount Code'), 'class' => 'epl_w80'), '_epl_discount_amount' => array('input_type' => 'text', 'input_name' => '_epl_discount_amount[]', 'label' => epl__('Amount'), 'class' => 'epl_w70'), '_epl_discount_type' => array('input_type' => 'select', 'input_name' => '_epl_discount_type[]', 'label' => epl__('Discount Type'), 'options' => array(5 => epl__('Fixed'), 10 => epl__('Percent')), 'class' => ''), '_epl_discount_max_usage' => array('input_type' => 'text', 'input_name' => '_epl_discount_max_usage[]', 'label' => epl__('Max Use'), 'class' => 'epl_w50'), '_epl_discount_end_date' => array('input_type' => 'text', 'input_name' => '_epl_discount_end_date[]', 'label' => epl__('Until'), 'class' => 'datepicker epl_w100', 'data_type' => 'unix_time', '__func' => 'epl_admin_date_display'), '_epl_discount_description' => array('input_type' => 'text', 'input_name' => '_epl_discount_description[]', 'placeholder' => epl__('Discount Description (optional)'), 'class' => 'epl_w100pct', 'help_text' => epl__('This label will appear in the total section as the discount description.')), '_epl_discount_active' => array('input_type' => 'select', 'input_name' => '_epl_discount_active[]', 'label' => epl__('Active'), 'options' => epl_yes_no(), 'default_value' => 0), '_epl_discount_cat_include' => array('input_type' => 'checkbox', 'input_name' => '_epl_discount_cat_include[]', 'label' => epl__('Include Only Categories'), 'options' => epl_term_list(), 'auto_key' => false, 'second_key' => '[]', 'display_inline' => true), '_epl_discount_condition' => array('input_type' => 'select', 'input_name' => '_epl_discount_condition[]', 'options' => array(0 => '', 5 => epl__('Total Amount'), 6 => epl__('Total Quantity'), 7 => epl__('Number of Events')), 'class' => ''), '_epl_discount_condition_logic' => array('input_type' => 'select', 'input_name' => '_epl_discount_condition_logic[]', 'options' => array('=' => '=', '>' => '>', '>=' => '>=', '<=' => '<=', 'between' => epl__('Between')), 'class' => ''), '_epl_discount_condition_value' => array('input_type' => 'text', 'input_name' => '_epl_discount_condition_value[]', 'class' => 'epl_w70'), '_epl_discount_condition_value2' => array('input_type' => 'text', 'input_name' => '_epl_discount_condition_value2[]', 'class' => 'epl_w70'), '_epl_discount_target' => array('input_type' => 'select', 'input_name' => '_epl_discount_target[]', 'options' => array(5 => epl__('Total Amount')), 'class' => ''), '_epl_discount_target_price_id' => array('input_type' => 'select', 'input_name' => '_epl_discount_target_price_id[]', 'options' => array(), 'class' => ''), '_epl_discount_forms' => array('weight' => 60, 'input_type' => 'checkbox', 'input_name' => '_epl_discount_forms[]', 'label' => epl__('Discount Specific Form'), 'options' => array(), 'second_key' => '[]'), '_epl_discount_forms_per' => array('weight' => 65, 'input_type' => 'select', 'input_name' => '_epl_discount_forms_per[]', 'label' => epl__('Display the form '), 'options' => array(1 => epl__('For each Attendee'), 2 => epl__('Only Once'), 3 => epl__('Do not show any attendee forms'))));
$epl_fields['epl_global_discount_fields'] = apply_filters('epl_global_discount_fields', $epl_fields['epl_global_discount_fields']);
//uasort( $epl_fields['epl_discount_fields'], 'epl_sort_by_weight' );
$epl_fields['epl_global_discount_rule_fields'] = array('_epl_discount_trigger' => array('input_type' => 'select', 'input_name' => '_epl_discount_trigger[]', 'options' => array(0 => '', 5 => epl__('Total Amount'), 6 => epl__('Total Quantity')), 'class' => ''), '_epl_discount_amount' => array('input_type' => 'text', 'input_name' => '_epl_discount_amount[]', 'label' => epl__('Amount'), 'class' => 'epl_w70'), '_epl_discount_type' => array('input_type' => 'select', 'input_name' => '_epl_discount_type[]', 'label' => epl__('Discount Type'), 'options' => array(5 => epl__('Fixed'), 10 => epl__('Percent')), 'class' => ''), '_epl_discount_max_usage' => array('input_type' => 'text', 'input_name' => '_epl_discount_max_usage[]', 'label' => epl__('Max Use'), 'class' => 'epl_w50'), '_epl_discount_end_date' => array('input_type' => 'text', 'input_name' => '_epl_discount_end_date[]', 'label' => epl__('Until'), 'class' => 'datepicker epl_w80', 'data_type' => 'unix_time'), '_epl_discount_active' => array('input_type' => 'select', 'input_name' => '_epl_discount_active[]', 'label' => epl__('Until'), 'options' => epl_yes_no(), 'default_value' => 0));
$epl_fields['epl_global_discount_rule_fields'] = apply_filters('epl_global_discount_rule_fields', $epl_fields['epl_global_discount_rule_fields']);
$epl_fields['epl_social_discount_fields'] = array('_epl_discount_code' => array('input_type' => 'text', 'input_name' => '_epl_discount_code[]', 'label' => epl__('Discount Code'), 'parent_keys' => true), '_epl_discount_buyer' => array('input_type' => 'text', 'input_name' => '_epl_discount_buyer[]', 'label' => epl__('Buyer')), '_epl_discount_amount' => array('input_type' => 'text', 'input_name' => '_epl_discount_amount[]', 'label' => epl__('Amount'), 'class' => 'epl_w70'), '_epl_discount_type' => array('input_type' => 'select', 'input_name' => '_epl_discount_type[]', 'label' => epl__('Discount Type'), 'options' => array(5 => epl__('Fixed'), 10 => epl__('Percent')), 'class' => ''), '_epl_discount_max_usage' => array('input_type' => 'text', 'input_name' => '_epl_discount_max_usage[]', 'label' => epl__('Max Use'), 'class' => 'epl_w40'), '_epl_discount_status' => array('input_type' => 'text', 'input_name' => '_epl_discount_Status[]', 'label' => epl__('Status'), 'class' => ''), '_epl_discount_end_date' => array('input_type' => 'text', 'input_name' => '_epl_discount_end_date[]', 'label' => epl__('Until'), 'class' => '', 'data_type' => 'unix_time', '__func' => 'epl_admin_date_display'), '_epl_discount_active' => array('input_type' => 'select', 'input_name' => '_epl_discount_active[]', 'label' => epl__('Active'), 'options' => epl_yes_no(), 'default_value' => 0));
<?php

global $epl_fields;
$epl_fields['epl_gateway_type'] = array('_epl_pay_types' => array('input_type' => 'select', 'input_name' => '_epl_pay_types', 'label' => epl__('Payment Type'), 'id' => 'epl_pay_type', 'empty_row' => true, 'options' => array('_pp_exp' => epl__('PayPal Express Checkout'))));
$epl_fields['_pp_exp_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('PayPal Express Checkout'), 'content' => sprintf(epl__('Visit %s for more information.'), epl_anchor('https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECGettingStarted', epl__('here')))), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_pp_exp'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Label'), 'description' => sprintf(epl__('What the customer will see as an option.  PayPal requires you to use one of their %s'), epl_anchor('https://www.paypal.com/express-checkout-buttons', epl__('buttons'))), 'class' => 'epl_w300'), '_epl_pre_checkout_message' => array('input_type' => 'textarea', 'input_name' => '_epl_pre_checkout_message', 'label' => epl__('Pre Redirect Message'), 'description' => epl__('This will be displayed before the user is redirected to PayPal'), 'class' => 'epl_w300'), '_epl_pp_exp_user' => array('input_type' => 'text', 'input_name' => '_epl_pp_exp_user', 'id' => '', 'label' => epl__('API Username'), 'description' => epl__('Ex: some_api1.youremailaddress.com'), 'class' => 'epl_w300', 'required' => true), '_epl_pp_exp_pwd' => array('input_type' => 'password', 'input_name' => '_epl_pp_exp_pwd', 'id' => '', 'label' => epl__('API Password'), 'description' => epl__('Ex: SDFE23D5SFD324'), 'class' => '_epl_w300', 'required' => true), '_epl_pp_exp_sig' => array('input_type' => 'password', 'input_name' => '_epl_pp_exp_sig', 'id' => '', 'label' => epl__('Signature'), 'description' => epl__('Will be a very long string. Ex. SRl31AbcSd9fIqew......'), 'class' => 'epl_w300', 'required' => true), '_epl_pp_landing_page' => array('input_type' => 'radio', 'input_name' => '_epl_pp_landing_page', 'id' => '', 'label' => epl__('PayPal Landing Page'), 'description' => epl__('If "PayPal Account Optional" is set to "on" inside your PayPal account, this option selects which section the users see by default when they reach PayPal.'), 'options' => array('Login' => epl__('PayPal account login'), 'Billing' => epl__('Non-PayPal account, for credit/debit cards')), 'default_value' => 'Billing', 'default_checked' => 1), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'description' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''));
$epl_fields['_check_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('Checks/Money Orders'), 'content' => epl__('You can use this to give your customers the ability to pay using a Check.')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_check'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Display Label'), 'description' => epl__('What the customer will see as an option.'), 'class' => 'epl_w300'), '_epl_check_payable_to' => array('input_type' => 'text', 'input_name' => '_epl_check_payable_to', 'id' => '_epl_form_label', 'label' => epl__('Make Payable To'), 'description' => epl__('Who will get this check?'), 'class' => 'epl_w300', 'required' => true), '_epl_check_address' => array('input_type' => 'textarea', 'input_name' => '_epl_check_address', 'label' => epl__('Send Payment To'), 'description' => epl__('The address.'), 'class' => 'epl_w300'), '_epl_check_instructions' => array('input_type' => 'textarea', 'input_name' => '_epl_check_instructions', 'id' => '', 'label' => epl__('Instructions'), 'description' => epl__('Special Instruction to the customer.'), 'class' => 'epl_w300'));
<?php

$default_button_css = "a.epl_button, input.epl_button,.epl_button_small  {\n    background-image:none !important;\n    backround-repeat:no-repeat;\n    border-radius: 0 !important;\n    display: inline-block;\n    margin: 0;\n    padding: 4px 14px !important;\n    border: 1px solid transparent;\n    color: #ffffff !important;\n    vertical-align: middle;\n    text-align: center;\n    font-weight: normal !important;\n    font-size: 13px !important;\n    line-height: 1.5384615384615385 !important;\n    cursor: pointer;\n    outline: none;\n    background-color: #3bafda !important;\n    border-color: #3bafda !important;\n    -webkit-transition: all 0.15s ease-in-out;\n    -moz-transition: all 0.15s ease-in-out;\n    -o-transition: all 0.15s ease-in-out;\n    transition: all 0.15s ease-in-out;\n    -webkit-box-sizing: border-box;\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n    text-decoration:none;\n}\n\n.epl_button_small {\n    padding: 2px 15px !important;\n    font-size: 0.8em !important;\n    margin-top:10px !important;\n}\n.epl_button:hover, .epl_button_small:hover, input[type=submit].epl_button_small:hover {\n    background-color: #66c1e2 !important;\n    border-color: #66c1e2 !important;\n}\n.epl_button:active, .epl_button_small:active, input[type=submit].epl_button_small:active {\n    position:relative;\n    top:1px;\n}\n";
global $epl_fields;
$epl_fields['epl_general_options'] = array('epl_sort_event_list_by' => array('input_type' => 'select', 'input_name' => 'epl_sort_event_list_by', 'label' => epl__('Sort Events By'), 'options' => array('date' => epl__('Date Published'), 'title' => epl__('Event Name'), 'start_date' => epl__('Event Start Date')), 'default_value' => 'date'), 'epl_sort_event_list_order' => array('input_type' => 'select', 'input_name' => 'epl_sort_event_list_order', 'label' => epl__('Sort Order'), 'options' => array('ASC' => epl__('Ascending'), 'DESC' => epl__('Descending')), 'default_value' => 10), 'epl_currency_code' => array('input_type' => 'select', 'input_name' => 'epl_currency_code', 'label' => epl__('Currency Code'), 'help_text' => epl__('This will be used in payment gateways. '), 'options' => array('AUD' => 'AUD', 'CAD' => 'CAD', 'CHF' => 'CHF (Switzerland Franc)', 'EUR' => 'EUR', 'GBP' => 'GBP', 'HKD' => 'HKD', 'JPY' => 'JPY', 'NOK' => 'NOK', 'NZD' => 'NZD', 'PHP' => 'PHP', 'USD' => 'USD', 'SAR' => 'SAR', 'SGD' => 'SGD (Singapore Dollar)', 'SEK' => 'SEK')), 'epl_currency_symbol' => array('input_type' => 'text', 'input_name' => 'epl_currency_symbol', 'label' => epl__('Currency Symbol'), 'help_text' => epl__("This will appear next to all the currency figures on the website.  Ex. \$, USD... "), 'class' => 'epl_w50'), 'epl_currency_symbol_location' => array('input_type' => 'select', 'input_name' => 'epl_currency_symbol_location', 'label' => epl__('Currency Symbol Location'), 'options' => array('b' => epl__('Before'), 'a' => epl__('After')), 'default_value' => 'b'), 'epl_currency_display_format' => array('input_type' => 'select', 'input_name' => 'epl_currency_display_format', 'options' => array(1 => '1,234.56', 2 => '1,234', 3 => '1234', 4 => '1234.56', 5 => '1 234,00', 6 => '1 234.00'), 'default_value' => 1, 'label' => epl__('Currency display format'), 'help_text' => epl__('This determines how your currency is displayed.  Ex. 1,234.56 or 1,200 or 1200.  This is only used for display purposes.')), 'epl_shortcode_page_id' => array('input_type' => 'select', 'input_name' => 'epl_shortcode_page_id', 'label' => epl__('Shortcode Page'), 'help_text' => epl__('Required.  Please select the page that contains the [events_planner] shortcode. '), 'options' => epl_sortcode_pages()), 'epl_admin_date_format' => array('input_type' => 'select', 'input_name' => 'epl_admin_date_format', 'options' => array('m/d/Y' => 'm/d/Y', 'd/m/Y' => 'd/m/Y', 'Y-m-d' => 'Y-m-d'), 'default_value' => 'm/d/Y', 'label' => epl__('Admin Date Format'), 'help_text' => epl__('This date format is used for displaying dates on the Admin screens of Events Planner.  On the front end, the WordPress General settings date is used.')), 'epl_disable_defult_css' => array('input_type' => 'select', 'input_name' => 'epl_disable_defult_css', 'options' => epl_yes_no(), 'default_value' => 0, 'label' => epl__('Disable Default CSS?'), 'help_text' => epl__("ADVANCED: If disabled, the default css file (events-planner > css > events-planner-style1.css) will not be loaded.  <br />This way, you can copy the contents of that file into your theme's style.css and modify any way you would like.")), 'epl_button_css' => array('input_type' => 'textarea', 'input_name' => 'epl_button_css', 'options' => epl_yes_no(), 'style' => 'width:600px;height:250px;', 'default_value' => $default_button_css, 'label' => epl__('Custom CSS'), 'help_text' => epl__("You can add custom CSS in this box to override front end CSS rules.  This data is stored in the database and is safe from plugin updates.")));
$epl_fields['epl_general_options'] = apply_filters('epl_general_options_fields', $epl_fields['epl_general_options']);
$epl_fields['epl_registration_options'] = array('epl_regis_id_length' => array('weight' => 10, 'input_type' => 'select', 'input_name' => 'epl_regis_id_length', 'label' => epl__('Registration ID length?'), 'help_text' => epl__('This will be an alphanumeric string.'), 'options' => epl_make_array(10, 26), 'default_value' => 10), 'epl_regis_enable_ssl' => array('weight' => 15, 'input_type' => 'select', 'input_name' => 'epl_regis_enable_ssl', 'label' => epl__('Enable SSL for registrations?'), 'help_text' => sprintf(epl__('%sIf you plan on accepting Credit Cards on your website, this must be set to Yes for PCI Compliance.  You need to have a SSL Certificate installed for this domain.%s'), '<span class=""><strong>', '</strong></span>'), 'options' => epl_yes_no(), 'default_value' => 0), 'epl_regis_add_url_token' => array('weight' => 11, 'input_type' => 'select', 'input_name' => 'epl_regis_add_url_token', 'label' => epl__('Add security token to registration confirmation url?'), 'description' => epl__("This will add a token to the registration url so that others can't accidentally stumble upon the registration details.  The registration confirmation url will change from ...registration/ASDFREWTR to ...registration/ASDFREWTR?epl_token=adlkfalsdfjl0ufj0923r."), 'options' => epl_yes_no(), 'default_value' => 10), 'epl_surcharge_section' => array('weight' => 19, 'input_type' => 'section', 'label' => '', 'class' => 'epl_font_555 epl_font_bold', 'content' => epl__('Default Surcharge Settings'), 'help_text' => epl__('You can override these settings for each event.')), 'epl_surcharge_global' => array('weight' => 21, 'input_type' => 'select', 'input_name' => 'epl_surcharge_global', 'label' => epl__('Apply Surcharge To'), 'options' => array(5 => epl__('All current and future events'), 10 => epl__('Let me choose for each event')), 'default_value' => 5), 'epl_surcharge_label' => array('weight' => 23, 'input_type' => 'text', 'input_name' => 'epl_surcharge_label', 'label' => epl__('Surcharge Label (default)'), 'help_text' => epl__('Label that will be displayed to the user.'), 'default_value' => epl__('Surcharge')), 'epl_surcharge_amount' => array('weight' => 25, 'input_type' => 'text', 'input_name' => 'epl_surcharge_amount', 'label' => epl__('Surcharge Amount (default)'), 'help_text' => epl__('This surcharge amount will apply by default to each event.  You will have the option to adjust this number for each event.'), 'data_type' => 'float', 'default_value' => '0.00'), 'epl_surcharge_type' => array('weight' => 30, 'input_type' => 'select', 'input_name' => 'epl_surcharge_type', 'label' => epl__('Surcharge Type (default)'), 'options' => array(5 => epl__('Fixed'), 10 => epl__('Percent')), 'default_value' => 10), 'epl_surcharge_before_discount' => array('weight' => 35, 'input_type' => 'select', 'input_name' => 'epl_surcharge_before_discount', 'label' => epl__('Apply surcharge (default)'), 'options' => array(10 => epl__('Before discount'), 0 => epl__('After discount')), 'default_value' => 10), 'epl_conv_section' => array('weight' => 39, 'input_type' => 'section', 'label' => '', 'class' => 'epl_font_555 epl_font_bold', 'content' => ''), 'epl_tracking_code' => array('weight' => 45, 'input_type' => 'textarea', 'input_name' => 'epl_tracking_code', 'label' => epl__('Conversion Tracking Code'), 'help_text' => epl__('You can paste javascript code in this box if you would like to track registration conversions (e.g. from Google Adwords).  This code will be included in the final page when the registration is succressfully completed, and only once.  The code must be wrapped in "script" tags.'), 'style' => 'width:90%;height:120px;', '_save_func' => 'wp_kses_post'), 'epl_enable_admin_override' => array('weight' => 55, 'input_type' => 'select', 'input_name' => 'epl_enable_admin_override', 'label' => epl__('Enable Admin Override?'), 'options' => epl_yes_no(), 'default_value' => 0, 'help_text' => epl__('When an admin user goes through the registration on the front end of the website, the user can override the total amount.')), 'epl_enable_admin_override_cal' => array('weight' => 57, 'input_type' => 'select', 'input_name' => 'epl_enable_admin_override_cal', 'label' => epl__('Enable Admin Override Calendar?'), 'options' => epl_yes_no(), 'default_value' => 0, 'help_text' => epl__('When an admin user goes through the registration on the front end of the website, a date selector calendar will be visible instead of the list of dates.')), 'epl_enable_donation' => array('weight' => 60, 'input_type' => 'select', 'input_name' => 'epl_enable_donation', 'label' => epl__('Enable Donations?'), 'options' => epl_yes_no(), 'default_value' => 0, 'help_text' => epl__('This will allow the registrants to make donations during the registration.')), 'epl_show_event_details_on_conf' => array('weight' => 62, 'input_type' => 'select', 'input_name' => 'epl_show_event_details_on_conf', 'label' => epl__('Display event details on confirmation page?'), 'options' => epl_yes_no(), 'default_value' => 0), 'epl_send_customer_confirm_message_to' => array('weight' => 64, 'input_type' => 'select', 'input_name' => 'epl_send_customer_confirm_message_to', 'options' => array(1 => epl__('Only the primary registrant'), 2 => epl__('All email addresses in all forms')), 'label' => epl__('Send confirmtion message to'), 'default_value' => 1));
$epl_fields['epl_registration_options'] = apply_filters('epl_registration_options_fields', $epl_fields['epl_registration_options']);
uasort($epl_fields['epl_registration_options'], 'epl_sort_by_weight');
$epl_fields['epl_event_options'] = array('epl_register_button_text' => array('input_type' => 'text', 'input_name' => 'epl_register_button_text', 'label' => epl__('Registration Button Text '), 'help_text' => epl__('Register, Sign Up, Buy Tickets...')), 'epl_date_location' => array('input_type' => 'select', 'input_name' => 'epl_date_location', 'options' => epl_yes_no(), 'label' => epl__('Enable Date Specific Location'), 'help_text' => epl__('This setting will let you indicate a specific location for each date.')), 'epl_date_note_enable' => array('input_type' => 'select', 'input_name' => 'epl_date_note_enable', 'options' => epl_yes_no(), 'label' => epl__('Enable Date Specific Notes'), 'help_text' => epl__('This setting will let you indicate a specific note for each date.')), 'epl_default_notification_email' => array('input_type' => 'text', 'input_name' => 'epl_default_notification_email', 'label' => epl__('Default Notification Email'), 'help_text' => epl__('Registration Notifications will be sent to this email, unless Alternate Notification Emails are indicated for the an event.'), 'default_value' => get_bloginfo('admin_email')), 'epl_admin_event_list_version' => array('input_type' => 'select', 'input_name' => 'epl_admin_event_list_version', 'options' => array(1 => epl__('Version') . " 1", 2 => epl__('Version') . " 2"), 'label' => epl__('Manage Event page version'), 'default_value' => 2));
$epl_fields['epl_event_options'] = apply_filters('epl_event_options_fields', $epl_fields['epl_event_options']);
$home_url = trailingslashit(home_url());
$epl_fields['epl_fullcalendar_options'] = array('epl_fullcalendar_theme' => array('input_type' => 'select', 'input_name' => 'epl_fullcalendar_theme', 'options' => array('' => epl__('Default'), 'base' => 'Base', 'black-tie' => 'Black Tie', 'blitzer' => 'Blitzer', 'cupertino' => 'Cupertino', 'dark-hive' => 'Dark Hive', 'dot-luv' => 'Dot Luv', 'eggplant' => 'Eggplant', 'excite-bike' => 'Excite Bike', 'hot-sneaks' => 'Hot Sneaks', 'humanity' => 'Humanity', 'le-frog' => 'Le Frog', 'mint-choc' => 'Mint Choc', 'overcast' => 'Overcast', 'pepper-grinder' => 'Pepper Grinder', 'redmond' => 'Redmond', 'smoothness' => 'Smoothness', 'south-street' => 'South Street', 'start' => 'Start', 'sunny' => 'Sunny', 'swanky-purse' => 'Swantky Purse', 'trontastic' => 'Trontastic', 'ui-darkness' => 'UI Darkness', 'ui-lightness' => 'UI Lightness', 'vader' => 'Vader'), 'default_value' => '', 'label' => epl__('FullCalendar Theme'), 'description' => epl__("These styles are loaded from the Google CDN.") . ' ' . epl_anchor('http://jqueryui.com/themeroller/', 'jQuery UI Styles')), 'epl_fullcalendar_enable_tooltip' => array('input_type' => 'select', 'input_name' => 'epl_fullcalendar_enable_tooltip', 'options' => epl_yes_no(), 'label' => epl__('Enable Tooltip'), 'default_value' => 10), 'epl_fullcalendar_show_legend' => array('input_type' => 'select', 'input_name' => 'epl_fullcalendar_show_legend', 'options' => array(0 => epl__('No'), 1 => epl__('Above Calendar'), 10 => epl__('Below Calendar')), 'label' => epl__('Display Category Legends'), 'default_value' => 10), 'epl_fullcalendar_show_att_count' => array('input_type' => 'select', 'input_name' => 'epl_fullcalendar_show_att_count', 'options' => array(0 => epl__('No'), 1 => epl__('Admin Only'), 2 => epl__('Logged-in Users'), 3 => epl__('All Users')), 'label' => epl__('Display Attendee Counts on Calendar?'), 'default_value' => 0), 'epl_fullcalendar_enable_cache' => array('input_type' => 'select', 'input_name' => 'epl_fullcalendar_enable_cache', 'options' => epl_yes_no(), 'label' => epl__('Enable Caching?'), 'help_text' => epl__('When this is enabled, the calendar generation query is refreshed every 4 hours or when an event is updated.  Caching will make the calendar load much faster.'), 'default_value' => 10), 'epl_fullcalendar_iCal' => array('input_type' => 'section', 'label' => '', 'class' => '', 'style' => 'font-size:12px;', 'content' => epl__("iCal Feeds") . "<div style='font-size:12px'>" . epl__('Regular iCal Feed') . ': ' . epl_anchor(add_query_arg(array('epl_action' => 'ical'), $home_url), add_query_arg(array('epl_action' => 'ical'), $home_url), '_blank') . "</div> " . "<div style='font-size:12px'>" . epl__('iCal Feed With Attendee Counts') . ': ' . epl_anchor(add_query_arg(array('epl_action' => 'ical', 'ical_token' => md5(NONCE_KEY)), $home_url), add_query_arg(array('epl_action' => 'ical', 'ical_token' => md5(NONCE_KEY)), $home_url), '_blank') . "</div> "), 'epl_fullcalendar_tax_bcg_color' => array('input_type' => 'text', 'input_name' => 'epl_fullcalendar_tax_bcg_color[]', 'label' => epl__('Event Taxonomy color')), 'epl_fullcalendar_tax_font_color' => array('input_type' => 'text', 'input_name' => 'epl_fullcalendar_tax_font_color[]', 'label' => epl__('Event Taxonomy font color')));
$epl_fields['epl_fullcalendar_options'] = apply_filters('epl_fullcalendar_options_fields', $epl_fields['epl_fullcalendar_options']);
do_action('epl_settings_fields');
 function construct_form($scope, $event_id, $forms, $attendee_number, $price_name = '', $price_id = null, $date_display = null)
 {
     static $ticket_number = 0;
     //keeps track of the attendee count for dispalay
     static $primary_counter = 1;
     //keeps track of the attendee count for dispalay
     static $primary_forms = array();
     global $event_details, $customer_email, $customer_name, $regis_details;
     global $email_regis_form;
     //TODO temp solution
     $has_email_field = false;
     if (!is_array($customer_email)) {
         $customer_email = array();
         $customer_name = array();
     }
     if ($email_regis_form == '') {
         $ticket_number = 0;
     }
     if ($scope != 'waitlist' && ($this->pulling_forms == 'pri' && $this->num_events_in_cart > 1 && $primary_counter < $this->num_events_in_cart)) {
         $ticket_number = 0;
         $primary_forms += $forms;
         $primary_counter++;
         return '';
     }
     $ur_specific = '';
     if ($scope == 'ticket_buyer' && !is_user_logged_in() && epl_um_is_enabled() && $this->add_new_user_enable() != 0 && $this->add_new_user_method() == 1) {
         $ur_specific = epl__("This email will be used to grant you membership access to our website.");
         if (!$this->add_new_user_show_pass_fields()) {
             $ur_specific .= '<br />' . epl__("  You will receive an email with your password after completing this registration.");
         }
         if ($this->mode != 'overview') {
             $ur_specific .= '<br />' . sprintf(epl__("If you are already a member of the website, please %s"), "<a href=" . wp_login_url(epl_get_url()) . " class='' title='Login'>" . epl__('Login Here') . "</a>");
         }
     }
     if ($ticket_number == 0 && !empty($primary_forms)) {
         $forms += $primary_forms;
     }
     $vals = $this->get_relevant_regis_values();
     //if data has already been entered into the session, get that data
     //$ticket_number = $attendee_number;
     $data['mode'] = $this->mode;
     //to compensate for pre 1.2.9 data
     if (!is_null($price_id) && version_compare(epl_regis_plugin_version(), '1.2.9', '<')) {
         if ($temp_price_id != $price_id) {
             $temp_price_id = $price_id;
             $ticket_number = 1;
         }
     }
     $data['ticket_number'] = $ticket_number;
     //counter
     $ticket_number = $attendee_number;
     //counter
     $data['ticket_counter_label'] = epl_get_element('_epl_addit_regis_form_counter_label', $event_details, epl__('Attendee'));
     //counter
     $data['price_name'] = $date_display != '' ? $date_display . ' - ' . $price_name : $price_name;
     //ticket name
     //if it is the ticket buyer form (the main required form)
     if ($scope == 'ticket_buyer') {
         unset($data['ticket_number']);
         unset($data['price_name']);
     }
     $data['copy_link'] = false;
     if ($scope == 'regis_forms') {
         $data['copy_link'] = epl_get_element('_epl_enable_form_to_form_copy', $event_details, 0) == 10 || epl_get_setting('epl_sc_options', 'epl_sc_form_to_form_copy', 0) == 10;
     }
     $data['fields'] = '';
     $data['forms'] = '';
     $data['form'] = '';
     $data['email_fields'] = '';
     $data['email_body_form'] = '';
     $available_fields = (array) $this->ecm->get_list_of_available_fields();
     //get the list of all available fields made with form manager
     $who_to_email = epl_get_setting('epl_registration_options', 'epl_send_customer_confirm_message_to', 1);
     if ($who_to_email == 2 || !epl_has_primary_forms()) {
         $who_to_email = 2;
     }
     foreach ($forms as $form_id => $form_atts) {
         $r = '';
         $data['fields'] = '';
         $data['email_fields'] = '';
         $epl_fields_inside_form = array_flip($form_atts['epl_form_fields']);
         //get the field ids inside the form
         //when creating a form in form manager, the user may rearrange fields.  Find their desired order
         $epl_fields_to_display = $this->epl_util->sort_array_by_array($available_fields, $epl_fields_inside_form);
         //for each field, there are attributes, like name, label, ....
         foreach ($epl_fields_to_display as $field_id => $field_atts) {
             if ($field_atts['input_type'] == 'hidden' && !EPL_IS_ADMIN) {
                 continue;
             }
             if (epl_get_element('admin_only', $field_atts, 0) == 10 && !epl_user_is_admin() && !EPL_IS_ADMIN) {
                 continue;
             }
             //if the field choices values are not given for select, radio, or checkbox
             //we will use field labels as values
             if (!array_filter((array) $field_atts['epl_field_choice_value'], 'trim')) {
                 $options = $field_atts['epl_field_choice_text'];
             } else {
                 $options = array_combine($field_atts['epl_field_choice_value'], $field_atts['epl_field_choice_text']);
             }
             //this will give the ability to select more than one option, for checkboxes and later, selects
             $adjuster = $field_atts['input_type'] == 'checkbox' ? '[]' : '';
             $_price_id_adjuster = !is_null($price_id) ? "[{$price_id}]" : null;
             $event_id_adjuster = "[{$event_id}]";
             /* $_val = ($vals != ''
                && epl_get_element( $field_atts['input_name'], $vals ) && epl_get_element( $event_id, $vals[$field_atts['input_name']] ) )
                ? epl_get_element( $ticket_number, (is_null( $_price_id_adjuster )? $vals[$field_atts['input_name']][$event_id]
                : epl_get_element( $price_id, $vals[$field_atts['input_name']][$event_id] ) ) )
                : null; */
             //echo "<pre class='prettyprint'>" . __LINE__ . "> $price_id " . print_r( $_price_id_adjuster, true ) . "</pre>";
             $_val = null;
             if ($vals != '') {
                 if (epl_get_element($field_atts['input_name'], $vals)) {
                     //not sure why I had || in here
                     if (isset($vals[$field_atts['input_name']][$ticket_number])) {
                         $_val = epl_get_element($ticket_number, $vals[$field_atts['input_name']]);
                         /* if ( !is_null( $price_id ) ){
                            $_val = epl_get_element_m($ticket_number, $price_id, $_val );
                            echo "<pre class='prettyprint'>" . __LINE__ . ">$ticket_number " . print_r($_val, true). "</pre>";
                            } */
                     } elseif (!empty($_POST['deleted_event'])) {
                         //if this element is posted, that means an event was removed from the cart.
                         //it will contain the event id, price id and the quantities.
                         $vals = $this->get_old_regis_values();
                         //get the values that were save in the db previously
                         foreach ($_POST['deleted_event'] as $deleted_event_id => $deleted_data) {
                             foreach ($deleted_data as $deleted_price_id => $quantities) {
                                 if ($quantities == 0) {
                                     continue;
                                 }
                                 if (is_null($_price_id_adjuster)) {
                                     $_val = epl_get_element($ticket_number, $vals[$field_atts['input_name']][$deleted_event_id]);
                                 } else {
                                     $_val = epl_get_element($ticket_number, epl_get_element($deleted_price_id, $vals[$field_atts['input_name']][$deleted_event_id]));
                                 }
                                 if ($_val != '') {
                                     break 2;
                                 }
                             }
                         }
                     } elseif (epl_get_element($event_id, $vals[$field_atts['input_name']])) {
                         if (is_null($_price_id_adjuster)) {
                             $_val = epl_get_element($ticket_number, $vals[$field_atts['input_name']][$event_id]);
                         } else {
                             $_val = epl_get_element($ticket_number, epl_get_element($price_id, $vals[$field_atts['input_name']][$event_id]));
                         }
                     }
                 }
             }
             if ($scope == 'ticket_buyer' || $scope == 'waitlist') {
                 $event_id_adjuster = '';
             }
             $args = array('input_type' => $field_atts['input_type'], 'input_name' => $field_atts['input_name'] . $event_id_adjuster . $_price_id_adjuster . "[{$ticket_number}]" . $adjuster, 'label' => $field_atts['label'], 'description' => $field_atts['description'] . ($field_atts['input_name'] == '4e794a6eeeb9a' ? $ur_specific : ''), 'required' => $field_atts['required'], 'validation' => epl_get_element('validation', $field_atts, ''), 'options' => $options, 'value' => $_val, 'class' => 'epl_field epl_field-' . $field_atts['input_type'], 'data_attr' => array('ticket_no' => $ticket_number));
             if (empty($_val)) {
                 $last_regis_data = $this->epl_get_last_regis_form_data_values($ticket_number);
                 if (!epl_is_empty_array($last_regis_data)) {
                     $args['default_value'] = epl_get_element($field_atts['input_name'], $last_regis_data);
                 } elseif ($ticket_number == 0) {
                     $def_val = apply_filters('epl_construct_form_default_value', $field_atts);
                     $args['default_value'] = !is_array($def_val) && !is_null($def_val) ? $def_val : $field_atts['default_value'];
                 } else {
                     $args['default_value'] = $field_atts['default_value'];
                 }
             }
             if ($who_to_email == 1 && $ticket_number == 0 || $who_to_email == 2) {
                 if (stripos($field_atts['input_slug'], 'email') !== false) {
                     $customer_email[$ticket_number] = $args['value'];
                     $has_email_field = true;
                 }
                 if (stripos($field_atts['input_slug'], 'first_name') !== false || stripos($field_atts['input_slug'], 'last_name') !== false) {
                     $customer_name[$ticket_number][$field_atts['input_slug']] = $args['value'];
                 }
             }
             //if overview, we don't want to display the field, just the value
             if ($this->mode == 'overview') {
                 $args += (array) $this->overview_trigger;
                 unset($args['required']);
             }
             $data['el'] = $this->epl_util->create_element($args, 0);
             $data['fields'] .= $this->epl->load_view($this->dest . '/registration/regis-field-row', $data, true);
             $data['email_fields'] .= $this->epl->load_view($this->dest . '/registration/regis-email-field-row', $data, true);
         }
         $data['event_title'] = $event_details['post_title'];
         $data['form_label'] = isset($form_atts['epl_form_options']) && in_array(0, (array) $form_atts['epl_form_options']) ? $form_atts['epl_form_label'] : '';
         $data['form_descr'] = isset($form_atts['epl_form_options']) && in_array(10, (array) $form_atts['epl_form_options']) ? $form_atts['epl_form_descritption'] : '';
         $r = $this->epl->load_view($this->dest . '/registration/regis-form-wrap', $data, true);
         $data['form'] .= $r;
         $data['email_body_form'] = $this->epl->load_view($this->dest . '/registration/regis-email-form-wrap', $data, true);
         $email_regis_form .= $data['email_body_form'];
     }
     if ($scope == 'ticket_buyer' || !epl_has_primary_forms()) {
         /*
          * - if enabled for all events
          * - and not set to no for this event
          * - or set to yes for this event
          */
         $global_newsletter_ok = false;
         if (epl_get_setting('epl_api_option_fields', 'epl_mc_key') != '' && epl_get_setting('epl_api_option_fields', 'epl_mc_action') != 0 && epl_get_element('_epl_offer_notification_sign_up', $event_details) != 0) {
             $global_newsletter_ok = true;
         }
         if ($has_email_field && epl_get_setting('epl_api_option_fields', 'epl_mc_action') != 0 && (epl_get_element('_epl_offer_notification_sign_up', $event_details) == 1 && $global_newsletter_ok)) {
             $_newsletter_signup = array('input_type' => 'select', 'input_name' => "newsletter_signup[{$ticket_number}]", 'label' => epl_get_setting('epl_api_option_fields', 'epl_mc_permission_label'), 'options' => epl_yes_no(), 'value' => epl_get_element($ticket_number, $this->current_data[$this->regis_id]['newsletter_signup']), 'class' => 'epl_w70');
             $data['el'] = $this->epl_util->create_element($_newsletter_signup + (array) $this->overview_trigger, 0);
             $data['form'] .= '<div class="epl_section epl_regis_field_wrapper regis_form">' . $this->epl->load_view($this->dest . '/registration/regis-field-row', $data, true) . '</div>';
         }
     }
     //if ( $event_details[''] )
     //  $copy_from = '';
     if ($this->mode != 'overview' && $data['copy_link'] || $this->on_admin) {
         $copy_from = '<a href="#" style="float:right;" class="epl_copy_from epl_button_small">' . epl__('Copy From') . '</a>';
     }
     $lookup_form = epl_get_element('epl_m', $_POST, 0) == 0 && epl_um_is_enabled() && epl_user_is_admin() && $this->mode == 'edit' ? ' <a href="#"  style="float:right;" class="open_lookup_form epl_button_small">' . epl__('Lookup') . '</a>' : '';
     if ($ticket_number == 0) {
         $edit_profile_link = apply_filters('epl_edit_profile_link', null);
         $ticket_buyer_legend = apply_filters('epl_ticket_buyer_form_legend', epl__('Primary Registrant'));
         $r = "<div id='epl_form_section--0' class='epl_regis_attendee_wrapper'><fieldset class='epl_fieldset'><legend>" . $ticket_buyer_legend . ' ' . $edit_profile_link . "</legend>" . $lookup_form . $data['form'] . '</fieldset></div>';
     } else {
         $delete_att = '';
         if (EPL_IS_ADMIN) {
             $delete_att = "<a href='#' class='epl_button_small epl_admin_del_attendee' data-event_id='{$event_details['ID']}' data-price_id='{$price_id}' data-ticket_no={$ticket_number}>" . epl__("Delete") . "</a>";
             $data['form'] .= "<input type='hidden' class='epl_ticket_no-{$event_id}-{$price_id}' value='{$ticket_number}' />";
         }
         $r = "<div id='epl_form_section--" . (isset($ticket_number) ? $event_id . '-' . $price_id . '-' . $ticket_number : 0) . "' class='epl_regis_attendee_wrapper'><fieldset class='epl_fieldset'><legend>" . $data['ticket_counter_label'] . ' ' . $ticket_number . ': ' . $data['price_name'] . " - {$event_details['post_title']}</legend> {$lookup_form} {$copy_from} {$delete_att}" . $data['form'] . '</fieldset></div>';
     }
     $ticket_number++;
     return $r;
 }
<?php

/*
 * Configuration fields for the event.
 * 
 * DO NOT MODIFY.
 *
 * Visit wpeventsplanner.com for instructions
 */
global $epl_fields;
$epl_fields['epl_event_type_fields'] = array('_epl_event_type' => array('input_type' => 'radio', 'input_name' => '_epl_event_type', 'options' => array(5 => 'One or more days.  The user can only choose <span class="epl_font_red">one</span> of the days (if more than one day is available).'), 'default_value' => 5, 'default_checked' => 1));
$epl_fields['epl_event_type_fields']['_epl_event_type'] = apply_filters('epl_event_type_fields', $epl_fields['epl_event_type_fields']['_epl_event_type']);
$epl_fields['epl_price_fields'] = array('_epl_price_name' => array('input_type' => 'text', 'input_name' => '_epl_price_name[]', 'class' => 'epl_w200', 'parent_keys' => true), '_epl_price' => array('input_type' => 'text', 'input_name' => '_epl_price[]', 'class' => 'epl_w70'), '_epl_price_parent_time_id' => array('input_type' => 'hidden', 'input_name' => '_epl_price_parent_time_id[]', 'default_value' => 0));
$epl_fields['epl_price_option_fields'] = array('_epl_free_event' => array('input_type' => 'select', 'input_name' => '_epl_free_event', 'label' => epl__('Is this a free event? '), 'options' => epl_yes_no(), 'default_value' => 0), '_epl_multi_price_select' => array('input_type' => 'select', 'input_name' => '_epl_multi_price_select', 'options' => epl_yes_no(), 'label' => epl__('If the event happens on different days, can the user select a different price for each one of the days?'), 'default_value' => 0), '_epl_free_event' => array('input_type' => 'select', 'input_name' => '_epl_free_event', 'options' => epl_yes_no(), 'label' => epl__('Is this a free event?'), 'default_value' => 0));
$epl_fields['epl_time_fields'] = array('_epl_start_time' => array('weight' => 10, 'input_type' => 'text', 'input_name' => '_epl_start_time[]', 'class' => 'epl_w100 timepicker', 'parent_keys' => true), '_epl_end_time' => array('weight' => 15, 'input_type' => 'text', 'input_name' => '_epl_end_time[]', 'class' => 'epl_w100 timepicker'));
$epl_fields['epl_time_option_fields'] = array('_epl_multi_time_select' => array('weight' => 10, 'input_type' => 'select', 'input_name' => '_epl_multi_time_select', 'options' => epl_yes_no(), 'label' => epl__('If the event happens on different days, can the user select a different time for each one of the days?'), 'default_value' => 0));
$epl_fields['epl_date_fields'] = array('_epl_start_date' => array('input_type' => 'text', 'input_name' => '_epl_start_date[]', 'label' => '', 'description' => '', 'style' => 'width:100px;', 'class' => ' datepicker', 'query' => 1, 'data_type' => 'unix_time', 'parent_keys' => true), '_epl_end_date' => array('input_type' => 'text', 'input_name' => '_epl_end_date[]', 'label' => '', 'description' => '', 'style' => 'width:100px;', 'class' => ' datepicker', 'query' => 1, 'data_type' => 'unix_time'), '_epl_regis_start_date' => array('input_type' => 'text', 'input_name' => '_epl_regis_start_date[]', 'label' => '', 'description' => '', 'style' => 'width:100px;', 'class' => ' datepicker', 'query' => 1, 'data_type' => 'unix_time'), '_epl_regis_end_date' => array('input_type' => 'text', 'input_name' => '_epl_regis_end_date[]', 'label' => '', 'description' => '', 'style' => 'width:100px;', 'class' => ' datepicker', 'query' => 1, 'data_type' => 'unix_time'), '_epl_date_capacity' => array('input_type' => 'text', 'input_name' => '_epl_date_capacity[]', 'label' => 'Capacity', 'description' => '', 'class' => 'epl_w40'));
$epl_fields['epl_recurrence_fields'] = array('_epl_rec_first_start_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_first_start_date', 'label' => '', 'description' => '', 'style' => 'width:100px;', 'class' => ' datepicker', 'query' => 1, 'data_type' => 'unix_time'), '_epl_rec_first_end_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_first_end_date', 'label' => '', 'description' => '', 'style' => 'width:100px;', 'class' => ' datepicker', 'query' => 1, 'data_type' => 'unix_time'), '_epl_rec_regis_start_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_regis_start_date', 'label' => '', 'description' => '', 'style' => 'width:100px;', 'class' => ' datepicker', 'query' => 1, 'data_type' => 'unix_time'), '_epl_rec_regis_start_days_before_start_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_regis_start_days_before_start_date', 'class' => 'epl_w40', 'description' => '', 'default_value' => ''), '_epl_rec_regis_end_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_regis_end_date', 'label' => '', 'description' => '', 'style' => 'width:100px;', 'class' => ' datepicker', 'query' => 1, 'data_type' => 'unix_time'), '_epl_rec_regis_end_days_before_start_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_regis_end_days_before_start_date', 'class' => 'epl_w40', 'description' => '', 'default_value' => ''), '_epl_recurrence_frequency' => array('input_type' => 'select', 'input_name' => '_epl_recurrence_frequency', 'options' => array(0 => 'Never', 'day' => 'Daily', 'week' => 'Weekly', 'month' => 'Monthly')), '_epl_recurrence_interval' => array('input_type' => 'select', 'input_name' => '_epl_recurrence_interval', 'options' => epl_make_array(1, 30)), '_epl_recurrence_end' => array('input_type' => 'text', 'input_name' => '_epl_recurrence_end', 'label' => '', 'description' => '', 'class' => 'datepicker epl_w100', 'data_type' => 'date'), '_epl_recurrence_weekdays' => array('input_type' => 'checkbox', 'input_name' => '_epl_recurrence_weekdays[]', 'options' => array(0 => epl__('Sun'), 1 => epl__('Mon'), 2 => epl__('Tue'), 3 => epl__('Wed'), 4 => epl__('Thu'), 5 => epl__('Fri'), 6 => epl__('Sat')), 'default_checked' => 1, 'display_inline' => true), '_epl_recurrence_repeat_by' => array('input_type' => 'radio', 'input_name' => '_epl_recurrence_repeat_by', 'options' => array(0 => epl__('Day of Month')), 'default_value' => 0));
$epl_fields['epl_special_fields'] = array('_epl_pricing_type' => array('input_type' => 'select', 'input_name' => '_epl_pricing_type', 'options' => array(0 => 'All the offered times have the same prices', 10 => 'Each time has special pricing'), 'label' => 'Event Type', 'description' => 'Different Event types'));
$epl_fields['epl_regis_form_fields'] = array('_epl_primary_regis_forms' => array('input_type' => 'checkbox', 'input_name' => '_epl_primary_regis_forms[]', 'label' => epl__('Ticket buyer form'), 'options' => array(), 'description' => epl__('AT LEAST ONE FORM IS REQUIRED.  This is the form that you will use for collecting information from the person that is doing the registration.')), '_epl_addit_regis_forms' => array('input_type' => 'checkbox', 'input_name' => '_epl_addit_regis_forms[]', 'label' => epl__('Forms for all attendees'), 'options' => array(), 'description' => epl__('This information will be collected from all the attendees.  If you do not need to collect individual information and only need the quantity, do not select any of these forms.')));
$epl_fields['epl_other_settings_fields'] = array('_epl_event_location' => array('input_type' => 'select', 'input_name' => '_epl_event_location', 'options' => get_list_of_available_locations(), 'empty_row' => true, 'label' => epl__('Event Location')), '_epl_event_sublocation' => array('input_type' => 'text', 'input_name' => '_epl_event_sublocation', 'label' => 'Room, suite...', 'description' => 'Enter more specific information about the location.', 'class' => 'epl_w300'), '_epl_payment_choices' => array('input_type' => 'checkbox', 'input_name' => '_epl_payment_choices[]', 'options' => get_list_of_payment_profiles(), 'label' => epl__('Payment Choices')), '_epl_event_organization' => array('input_type' => 'select', 'input_name' => '_epl_event_organization', 'options' => get_list_of_orgs(), 'empty_row' => true, 'label' => epl__('Organization hosting the event')), '_epl_display_org_info' => array('input_type' => 'select', 'input_name' => '_epl_display_org_info', 'label' => epl__('Display Organization Info'), 'description' => 'Display the Organization info on the event list?', 'options' => epl_yes_no(), 'default_value' => 0, 'class' => ''));
$epl_fields['epl_option_fields'] = array('_epl_event_status' => array('input_type' => 'select', 'input_name' => '_epl_event_status', 'label' => epl__('Event Status'), 'options' => array(0 => epl__('Inactive'), 1 => epl__('Active'), 10 => epl__('Cancelled')), 'description' => '', 'class' => ''));
$epl_fields['epl_display_option_fields'] = array('_epl_display_regis_button' => array('input_type' => 'select', 'input_name' => '_epl_display_regis_button', 'label' => epl__('Show Registration Button'), 'options' => epl_yes_no(), 'description' => '', 'default_value' => 10, 'class' => ''));
$epl_fields['epl_capacity_fields'] = array('_epl_event_capacity_per' => array('input_type' => 'select', 'input_name' => '_epl_event_capacity_per', 'label' => epl__('Per'), 'description' => 'Per Event, Time, and Price available in PRO  version.', 'options' => array('date' => epl__('Each Dates'))), '_epl_event_available_space_display' => array('input_type' => 'select', 'input_name' => '_epl_event_available_space_display', 'label' => epl__('Display Available spaces'), 'description' => '', 'options' => epl_yes_no()), '_epl_min_attendee_per_regis' => array('input_type' => 'text', 'input_name' => '_epl_min_attendee_per_regis', 'label' => '', 'description' => 'Minimum number of registrants that the user can register.', 'class' => 'epl_w50', 'default_value' => 1), '_epl_max_attendee_per_regis' => array('input_type' => 'text', 'input_name' => '_epl_max_attendee_per_regis', 'label' => '', 'description' => 'Maximum number of registrants that the user can register.', 'class' => 'epl_w50', 'default_value' => 1), '_epl_attendee_regis_limit_per' => array('input_type' => 'select', 'input_name' => '_epl_attendee_regis_limit_per', 'label' => 'Max attendees', 'description' => 'Per Event and Each Event Date in PRO.', 'options' => array('price' => epl__('Each Event Price'))), '_epl_multi_time_select' => array('input_type' => 'radio', 'input_name' => '_epl_multi_time_select', 'label' => 'Max attendees', 'description' => '', 'options' => array(10 => epl__('Event'), 20 => epl__('Each Event Date'), 30 => epl__('Each Event Time Slot'), 40 => epl__('Each Event Price'))), '_epl_multi_price_select' => array('input_type' => 'select', 'input_name' => '_epl_multi_price_select', 'label' => 'Max attendees', 'description' => '', 'options' => array(10 => epl__('Event'), 20 => epl__('Each Event Date'), 30 => epl__('Each Event Time Slot'), 40 => epl__('Each Event Price'))));
function epl_sc_option_fields()
{
    global $epl_fields;
    $epl_fields['epl_sc_options'] = array('epl_sc_enable' => array('weight' => 5, 'input_type' => 'select', 'input_name' => 'epl_sc_enable', 'options' => array(0 => epl__('No'), 10 => epl__('Yes. Pop-up based'), 15 => epl__('Yes. Button based')), 'default_value' => 0, 'label' => epl__('Enable Shopping Cart'), 'description' => epl__('When enabled, the user will have the ability to register for more than one event.  Pop-up based carts displays a modal box for the user to select the event.  Button based will update the button and mark it as added to the cart.  Users will have the option to update their selections in the cart regardless of which method you use.')), 'epl_sc_footer_subtotal' => array('weight' => 6, 'input_type' => 'select', 'input_name' => 'epl_sc_footer_subtotal', 'options' => epl_yes_no(), 'default_value' => 10, 'label' => epl__('Enable Footer Totals'), 'description' => epl__('When events are added to the cart, a small box in the footer will show what the user has selected and give him the option to delete items from the cart.')), 'epl_sc_forms_to_use' => array('weight' => 7, 'input_type' => 'select', 'input_name' => 'epl_sc_forms_to_use', 'options' => array(1 => epl__('Use the forms below'), 5 => epl__('Use the forms indicated for each event')), 'default_value' => 0, 'label' => epl__('Registrations forms to use'), 'description' => epl__('When the users go through the registration and they have more than one event in the cart, the system can display the individual forms associated with each event or it can display one set of forms that you choose below. ')), 'epl_sc_primary_regis_forms' => array('weight' => 10, 'input_type' => 'table_checkbox', 'input_name' => 'epl_sc_primary_regis_forms[]', 'label' => epl__('Ticket buyer form'), 'options' => epl_get_list_of_available_forms(), 'auto_key' => true, 'class' => '', 'description' => epl__('Optional.  This is the form that you will use for collecting information from the person that is doing the registration.')), 'epl_sc_addit_regis_forms' => array('weight' => 15, 'input_type' => 'table_checkbox', 'input_name' => 'epl_sc_addit_regis_forms[]', 'label' => epl__('Forms for all attendees'), 'options' => epl_get_list_of_available_forms(), 'auto_key' => true, 'class' => '', 'description' => '<img src="' . EPL_FULL_URL . 'images/error.png" /> ' . epl__('This information will be collected from all the attendees and will be recorded for each event.  If you do not need to collect individual information and only need the quantity, do not select any of these forms.')), 'epl_sc_form_to_form_copy' => array('weight' => 18, 'input_type' => 'select', 'input_name' => 'epl_sc_form_to_form_copy', 'label' => epl__('Enable form to form copy?'), 'options' => epl_get_list_of_available_forms(), 'options' => epl_yes_no(), 'default_value' => 0, 'class' => ''), 'epl_sc_payment_choices' => array('weight' => 20, 'input_type' => 'table_checkbox', 'input_name' => 'epl_sc_payment_choices[]', 'options' => get_list_of_payment_profiles(), 'label' => epl__('Payment Choices'), 'empty_options_msg' => epl__('No Payment Profiles. Please go to Events Planner > Payment Profiles.'), 'class' => '', 'default_value' => get_list_of_default_payment_profiles(), 'auto_key' => true), 'epl_sc_default_selected_payment' => array('weight' => 25, 'input_type' => 'select', 'input_name' => 'epl_sc_default_selected_payment', 'options' => get_list_of_payment_profiles(), 'label' => epl__('Default Selected Payment'), 'help_text' => epl__('This determines which payment method is automatically selected when the user visits the regsitration cart for the first time.'), 'empty_options_msg' => epl__('No Payment Profiles. Please go to Events Planner > Payment Profiles.'), 'class' => 'req'), 'epl_sc_notification' => array('weight' => 30, 'input_type' => 'select', 'input_name' => 'epl_sc_notification', 'options' => get_list_of_available_notifications(), 'label' => epl__('Confirmation email'), 'help_text' => epl__('Email that is sent to the users after they register.'), 'empty_row' => true, 'empty_options_msg' => epl__('No email messages found.  Please go to Events Planner > Notification Manager to create notifications.')));
    $epl_fields['epl_sc_options'] = apply_filters('epl_shopping_cart_options_fields', $epl_fields['epl_sc_options']);
    uasort($epl_fields['epl_sc_options'], 'epl_sort_by_weight');
}
<?php

global $epl_fields;
$epl_fields['epl_location_fields'] = array('_epl_location_address' => array('weight' => 5, 'input_type' => 'text', 'input_name' => '_epl_location_address', 'label' => epl__('Address'), 'class' => 'epl_w300 req'), '_epl_location_address2' => array('weight' => 10, 'input_type' => 'text', 'input_name' => '_epl_location_address2', 'label' => epl__('Address 2'), 'description' => '', 'class' => 'epl_w300'), '_epl_location_city' => array('weight' => 15, 'input_type' => 'text', 'input_name' => '_epl_location_city', 'label' => epl__('City'), 'class' => 'req'), '_epl_location_state' => array('weight' => 20, 'input_type' => 'text', 'input_name' => '_epl_location_state', 'label' => epl__('State'), 'class' => 'req'), '_epl_location_country' => array('weight' => 22, 'input_type' => 'text', 'input_name' => '_epl_location_country', 'label' => epl__('Country'), 'class' => 'req'), '_epl_location_zip' => array('weight' => 25, 'input_type' => 'text', 'input_name' => '_epl_location_zip', 'label' => epl__('Zip')), '_epl_location_phone' => array('weight' => 30, 'input_type' => 'text', 'input_name' => '_epl_location_phone', 'label' => epl__('Phone')), '_epl_location_email' => array('weight' => 35, 'input_type' => 'text', 'input_name' => '_epl_location_email', 'label' => epl__('Email'), 'class' => 'epl_w300'), '_epl_location_url' => array('weight' => 40, 'input_type' => 'text', 'input_name' => '_epl_location_url', 'label' => epl__('Website'), 'description' => epl__('Please enter http://...'), 'class' => 'epl_w300'), '_epl_location_display_map_link' => array('weight' => 45, 'input_type' => 'select', 'input_name' => '_epl_location_display_map_link', 'options' => epl_yes_no(), 'label' => epl__('Display map link icon?'), 'description' => epl__('If yes, a map icon will be displayed on the event list.'), 'default_value' => 10), '_epl_location_long' => array('weight' => 50, 'input_type' => 'text', 'input_name' => '_epl_location_long', 'label' => epl__('Longitude'), 'description' => epl__('This information is automatically obtained from Google when this record is saved.  Address, City, State are required.'), 'class' => 'epl_w300', 'data_type' => 'float'), '_epl_location_lat' => array('weight' => 55, 'input_type' => 'text', 'input_name' => '_epl_location_lat', 'label' => epl__('Latitude'), 'description' => epl__('This information is automatically obtained from Google when this record is saved.  Address, City, State are required.'), 'class' => 'epl_w300', 'data_type' => 'float'), '_epl_location_notes' => array('weight' => 60, 'input_type' => 'textarea', 'input_name' => '_epl_location_notes', 'label' => epl__('Notes')));
$epl_fields['epl_location_fields'] = apply_filters('epl_location_fields', $epl_fields['epl_location_fields']);
uasort($epl_fields['epl_location_fields'], 'epl_sort_by_weight');
$epl_fields['epl_class_session_fields'] = apply_filters('epl_class_session_fields', $epl_fields['epl_class_session_fields']);
uasort($epl_fields['epl_class_session_fields'], 'epl_sort_by_weight');
$epl_fields['epl_recurrence_fields'] = array('_epl_rec_first_start_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_first_start_date', 'style' => 'width:100px;', 'class' => ' datepicker req', 'query' => 1, 'data_type' => 'unix_time', '__func' => 'epl_admin_date_display'), '_epl_rec_first_end_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_first_end_date', 'style' => 'width:100px;', 'class' => ' datepicker req', 'query' => 1, 'data_type' => 'unix_time', '__func' => 'epl_admin_date_display'), '_epl_rec_regis_start_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_regis_start_date', 'style' => 'width:100px;', 'class' => ' datepicker req', 'query' => 1, 'data_type' => 'unix_time', '__func' => 'epl_admin_date_display'), '_epl_rec_regis_start_days_before_start_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_regis_start_days_before_start_date', 'class' => 'epl_w40 req'), '_epl_rec_regis_end_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_regis_end_date', 'style' => 'width:100px;', 'class' => ' datepicker req', 'query' => 1, 'data_type' => 'unix_time', '__func' => 'epl_admin_date_display'), '_epl_rec_regis_end_days_before_start_date' => array('input_type' => 'text', 'input_name' => '_epl_rec_regis_end_days_before_start_date', 'class' => 'epl_w40 req', 'help_text' => '', 'default_value' => ''), '_epl_recurrence_frequency' => array('input_type' => 'select', 'input_name' => '_epl_recurrence_frequency', 'options' => array(0 => 'Never', 'day' => 'Daily', 'week' => 'Weekly', 'month' => 'Monthly'), 'class' => 'req'), '_epl_recurrence_interval' => array('input_type' => 'select', 'input_name' => '_epl_recurrence_interval', 'options' => epl_make_array(1, 30), 'class' => 'req'), '_epl_recurrence_end' => array('input_type' => 'text', 'input_name' => '_epl_recurrence_end', 'label' => '', 'help_text' => '', 'class' => 'datepicker req epl_w100', 'data_type' => 'unix_time', '__func' => 'epl_admin_date_display'), '_epl_recurrence_weekdays' => array('input_type' => 'checkbox', 'input_name' => '_epl_recurrence_weekdays[]', 'options' => array(0 => epl__('Sun'), 1 => epl__('Mon'), 2 => epl__('Tue'), 3 => epl__('Wed'), 4 => epl__('Thu'), 5 => epl__('Fri'), 6 => epl__('Sat')), 'default_checked' => 1, 'display_inline' => true, 'class' => 'req'), '_epl_recurrence_repeat_by' => array('input_type' => 'radio', 'input_name' => '_epl_recurrence_repeat_by', 'options' => array(0 => epl__('Day of Month')), 'default_value' => 0, 'help_text' => epl__('Coming soon, ability to select per week of the month (i.e. first, second, last week).')), '_epl_recurrence_capacity' => array('input_type' => 'text', 'input_name' => '_epl_recurrence_capacity', 'help_text' => '', 'class' => 'epl_w50'));
$epl_fields['epl_recurrence_fields'] = apply_filters('epl_recurrence_fields', $epl_fields['epl_recurrence_fields']);
$epl_fields['epl_special_fields'] = array('_epl_pricing_type' => array('input_type' => 'select', 'input_name' => '_epl_pricing_type', 'options' => array(0 => 'All the offered times have the same prices', 10 => 'Each time has special pricing'), 'label' => 'Event Type', 'help_text' => 'Different Event types'));
$epl_fields['epl_regis_form_fields'] = array('_epl_primary_regis_forms' => array('input_type' => 'table_checkbox', 'input_name' => '_epl_primary_regis_forms[]', 'label' => epl__('Primary registrant forms'), 'options' => array(), 'auto_key' => true, 'description' => epl__('Optional.  This is the form that you will use for collecting information from the person that is doing the registration.')), '_epl_addit_regis_forms' => array('input_type' => 'table_checkbox', 'input_name' => '_epl_addit_regis_forms[]', 'label' => epl__('Forms for all attendees'), 'options' => array(), 'auto_key' => true, 'help_text' => '<img src="' . EPL_FULL_URL . 'images/error.png" /> ' . epl__('This information will be collected from all the attendees.  If you do not need to collect individual information and only need the quantity, do not select any of these forms.')), '_epl_addit_regis_form_counter_label' => array('input_type' => 'text', 'input_name' => '_epl_addit_regis_form_counter_label', 'label' => epl__('Form Section Counter Label'), 'default_value' => epl__('Attendee'), 'help_text' => epl__('When additional forms are presented besides the Ticket Buyer form, this value will be presented before the counter.  For example, Attendee #1, Attendee #2...')), '_epl_enable_form_to_form_copy' => array('input_type' => 'select', 'input_name' => '_epl_enable_form_to_form_copy', 'options' => epl_yes_no(), 'default_value' => 0, 'label' => epl__('Enable form to form copy?'), 'default_value' => epl__('Attendee'), 'help_text' => epl__('This will give your users the ability to copy data from form to form during the registration.')));
$epl_fields['epl_other_settings_fields'] = array('_epl_event_location' => array('weight' => 5, 'input_type' => 'select', 'input_name' => '_epl_event_location', 'options' => get_list_of_available_locations(), 'empty_row' => true, 'empty_options_msg' => epl__('No Locations found. Please go to Events Planner > Event Locations.'), 'label' => epl__('Event Location')), '_epl_event_sublocation' => array('weight' => 10, 'input_type' => 'text', 'input_name' => '_epl_event_sublocation', 'label' => epl__('Room, suite...'), 'help_text' => epl__('Enter more specific information about the location.'), 'class' => 'epl_w300'), '_epl_payment_choices' => array('weight' => 15, 'input_type' => 'table_checkbox', 'input_name' => '_epl_payment_choices[]', 'options' => get_list_of_payment_profiles(), 'label' => epl__('Payment Choices'), 'empty_options_msg' => epl__('No Payment Profiles. Please go to Events Planner > Payment Profiles.'), 'class' => 'req', 'default_value' => get_list_of_default_payment_profiles(), 'auto_key' => true, 'style' => ''), '_epl_default_selected_payment' => array('weight' => 17, 'input_type' => 'select', 'input_name' => '_epl_default_selected_payment', 'options' => get_list_of_payment_profiles(), 'label' => epl__('Default Selected Payment'), 'help_text' => epl__('This determines which payment method is automatically selected when the user visits the regsitration cart for the first time.'), 'empty_options_msg' => epl__('No Payment Profiles. Please go to Events Planner > Payment Profiles.'), 'class' => 'req'), '_epl_event_organization' => array('weight' => 20, 'input_type' => 'select', 'input_name' => '_epl_event_organization', 'options' => get_list_of_orgs(), 'empty_options_msg' => epl__('No Organizations found. Please go to Events Planner > Organizations.'), 'empty_row' => true, 'label' => epl__('Organization hosting the event')));
$epl_fields['epl_other_settings_fields'] = apply_filters('epl_other_settings_fields', $epl_fields['epl_other_settings_fields']);
uasort($epl_fields['epl_other_settings_fields'], 'epl_sort_by_weight');
$epl_fields['epl_option_fields'] = array('_epl_event_status' => array('weight' => 5, 'input_type' => 'select', 'input_name' => '_epl_event_status', 'label' => epl__('Status'), 'options' => array(0 => epl__('Inactive'), 1 => epl__('Active'), 2 => epl__('Active (hidden)'), 3 => epl__('Ongoing'), 10 => epl__('Cancelled')), 'class' => ''), '_epl_regis_privilege' => array('weight' => 10, 'input_type' => 'select', 'input_name' => '_epl_regis_privilege', 'label' => epl__('Registration Availability'), 'options' => array(0 => epl__('Open to public'), 1 => epl__('Members Only')), 'class' => ''), '_epl_registration_max' => array('weight' => 15, 'input_type' => 'text', 'input_name' => '_epl_registration_max', 'label' => epl__('Max. per registration'), 'class' => ''));
$epl_fields['epl_option_fields'] = apply_filters('epl_option_fields', $epl_fields['epl_option_fields']);
uasort($epl_fields['epl_option_fields'], 'epl_sort_by_weight');
$epl_fields['epl_display_option_fields'] = array('_epl_display_regis_button' => array('input_type' => 'select', 'input_name' => '_epl_display_regis_button', 'label' => epl__('Show Registration Button'), 'options' => epl_yes_no(), 'default_value' => 10, 'class' => ''), '_epl_date_display_type' => array('input_type' => 'select', 'input_name' => '_epl_date_display_type', 'label' => epl__('Date Display Type'), 'options' => array(0 => epl__('None'), 5 => epl__('Table'), 10 => epl__('Calendar')), 'help_text' => epl__('Determines if the dates displayed on the event list are in table format or in small calendar format.'), 'default_value' => 5, 'class' => ''), '_epl_display_content' => array('input_type' => 'select', 'input_name' => '_epl_display_content', 'label' => epl__('Content Display Type'), 'options' => array(0 => epl__('None'), 1 => epl__('Excerpt'), 2 => epl__('Content')), 'help_text' => epl__('Determines which content to display in the event list.'), 'default_value' => 2, 'class' => ''), '_epl_event_available_space_display' => array('input_type' => 'select', 'input_name' => '_epl_event_available_space_display', 'label' => epl__('Display available spaces?'), 'help_text' => '', 'options' => epl_yes_no()), '_epl_event_detail_cart_display' => array('input_type' => 'select', 'input_name' => '_epl_event_detail_cart_display', 'label' => epl__('Display Event Details in cart?'), 'help_text' => '', 'options' => epl_yes_no()), '_epl_alt_admin_email' => array('input_type' => 'text', 'input_name' => '_epl_alt_admin_email', 'label' => epl__('Alternate Notification Emails'), 'help_text' => epl__('Enter a comma separated list of email addresses that you would like to send the registration confirmation emails to.'), 'class' => 'epl_w400'), '_epl_alt_regis_url' => array('input_type' => 'text', 'input_name' => '_epl_alt_regis_url', 'label' => epl__('Alternate Registration URL'), 'help_text' => epl__('If you would like to have the register button point to an alternate registration page or form.'), 'class' => 'epl_w400'), '_epl_cal_link_destination' => array('input_type' => 'select', 'input_name' => '_epl_cal_link_destination', 'label' => epl__('Calendar/Widget link destination'), 'options' => array(0 => epl__('Registration Page'), 1 => epl__('Event Details')), 'default_value' => 0), '_epl_title_link_destination' => array('input_type' => 'select', 'input_name' => '_epl_title_link_destination', 'label' => epl__('Event Title link destination'), 'options' => array(0 => epl__('Event Details'), 1 => epl__('Registration Page')), 'default_value' => 0));
$epl_fields['epl_display_option_fields'] = apply_filters('epl_display_option_fields', $epl_fields['epl_display_option_fields']);
//uasort( $epl_fields['epl_display_option_fields'], 'epl_sort_by_weight' );
$epl_fields['epl_message_fields'] = array('_epl_message_location' => array('weight' => 10, 'input_type' => 'select', 'input_name' => '_epl_message_location[]', 'label' => epl__('Message Location'), 'empty_row' => 1, 'options' => array('epl_regis_all_message_top' => epl__('All registration pages - top'), 'epl_regis_all_message_bottom' => epl__('All registration pages - bottom'), 'epl_cart_top_message' => epl__('Cart - top'), 'epl_cart_bottom_message' => epl__('Cart - bottom'), 'epl_regis_form_top_message' => epl__('Registration form - top'), 'epl_regis_form_bottom_message' => epl__('Registration form - bottom'), 'epl_regis_complete_top_message' => epl__('Registration complete - top'), 'epl_regis_complete_bottom_message' => epl__('Registration complete - bottom')), 'class' => 'req', 'parent_keys' => true), '_epl_message_type' => array('weight' => 15, 'input_type' => 'select', 'input_name' => '_epl_message_type[]', 'empty_row' => 1, 'options' => array('epl_info_message' => epl__('Info'), 'epl_success_message' => epl__('Success'), 'epl_warning_message' => epl__('Warning'), 'epl_error_message' => epl__('Error')), 'class' => ''), '_epl_message' => array('weight' => 20, 'input_type' => 'textarea', 'input_name' => '_epl_message[]', 'label' => epl__('Min.'), 'class' => 'epl_w100pct mceeditor req', '_save_func' => 'wp_kses_post'));
$epl_fields['epl_message_fields'] = apply_filters('epl_message_fields', $epl_fields['epl_message_fields']);
uasort($epl_fields['epl_message_fields'], 'epl_sort_by_weight');
$epl_fields['epl_report_fields'] = array('_epl_report_column' => array('weight' => 10, 'input_type' => 'checkbox', 'input_name' => '_epl_report_column[]'), '_epl_report_column_width' => array('weight' => 15, 'input_type' => 'text', 'input_name' => '_epl_report_column_width[]'));
$epl_fields['epl_report_fields'] = apply_filters('epl_report_fields', $epl_fields['epl_report_fields']);
uasort($epl_fields['epl_report_fields'], 'epl_sort_by_weight');
$epl_fields['epl_attendee_list_fields'] = array('_epl_show_attendee_list_link' => array('weight' => 10, 'input_type' => 'select', 'input_name' => '_epl_show_attendee_list_link', 'label' => epl__('Show Attendee List Link?'), 'options' => epl_yes_no(), 'class' => ''), '_epl_show_attendee_list_button_location' => array('weight' => 20, 'input_type' => 'select', 'input_name' => '_epl_show_attendee_list_button_location', 'label' => epl__('Link Location'), 'options' => array('event_list' => epl__('Event List'), 'thank_you_page' => epl__('Registration Confirmation Page'), 'shortcode' => epl__('Shortcode')), 'class' => ''), '_epl_show_attendee_list_template' => array('weight' => 20, 'input_type' => 'select', 'input_name' => '_epl_show_attendee_list_template', 'label' => epl__('Attendee List Template'), 'options' => array('attendee-list-1' => epl__('Template 1'), 'attendee-list-2' => epl__('Template 2')), 'class' => ''), '_epl_attendee_list_field' => array('input_type' => 'checkbox', 'input_name' => '_epl_attendee_list_field[]'));
$epl_fields['epl_attendee_list_fields'] = apply_filters('epl_attendee_list_fields', $epl_fields['epl_attendee_list_fields']);
uasort($epl_fields['epl_attendee_list_fields'], 'epl_sort_by_weight');
$epl_fields['epl_discount_fields'] = array('_epl_allow_global_discounts' => array('input_type' => 'select', 'input_name' => '_epl_allow_global_discounts', 'label' => epl__('Allow global discounts for this event?'), 'help_text' => epl__('This setting determines if global coupon codes or automatic discounts can be applied to this event.'), 'options' => epl_yes_no(), 'default_value' => 10, 'class' => ''), '_epl_discount_method' => array('input_type' => 'select', 'input_name' => '_epl_discount_method[]', 'options' => array(5 => epl__('Code'), 10 => epl__('Automatic')), 'label' => epl__('Discount Method'), 'class' => '', 'parent_keys' => true), '_epl_discount_code' => array('input_type' => 'text', 'input_name' => '_epl_discount_code[]', 'label' => epl__('Discount Code'), 'class' => 'epl_w80'), '_epl_discount_amount' => array('input_type' => 'text', 'input_name' => '_epl_discount_amount[]', 'label' => epl__('Amount'), 'class' => 'epl_w70'), '_epl_discount_type' => array('input_type' => 'select', 'input_name' => '_epl_discount_type[]', 'label' => epl__('Discount Type'), 'options' => array(5 => epl__('Fixed'), 10 => epl__('Percent')), 'class' => ''), '_epl_discount_max_usage' => array('input_type' => 'text', 'input_name' => '_epl_discount_max_usage[]', 'label' => epl__('Max Use'), 'class' => 'epl_w50'), '_epl_discount_end_date' => array('input_type' => 'text', 'input_name' => '_epl_discount_end_date[]', 'label' => epl__('Until'), 'class' => 'datepicker epl_w100', 'data_type' => 'unix_time', '__func' => 'epl_admin_date_display'), '_epl_discount_description' => array('input_type' => 'text', 'input_name' => '_epl_discount_description[]', 'placeholder' => epl__('Discount Description (optional)'), 'class' => 'epl_w100pct', 'help_text' => epl__('This label will appear in the total section as the discount description.')), '_epl_discount_active' => array('input_type' => 'select', 'input_name' => '_epl_discount_active[]', 'label' => epl__('Active'), 'options' => epl_yes_no(), 'default_value' => 0), '_epl_discount_condition' => array('input_type' => 'select', 'input_name' => '_epl_discount_condition[]', 'options' => array(0 => '', 5 => epl__('Total Amount'), 6 => epl__('Total Quantity'), 8 => epl__('Number of Days')), 'class' => ''), '_epl_discount_condition_logic' => array('input_type' => 'select', 'input_name' => '_epl_discount_condition_logic[]', 'options' => array('=' => '=', '>' => '>', '>=' => '>=', '<=' => '<=', 'between' => epl__('Between')), 'class' => ''), '_epl_discount_condition_value' => array('input_type' => 'text', 'input_name' => '_epl_discount_condition_value[]', 'class' => 'epl_w70'), '_epl_discount_condition_value2' => array('input_type' => 'text', 'input_name' => '_epl_discount_condition_value2[]', 'class' => 'epl_w70'), '_epl_discount_target' => array('input_type' => 'select', 'input_name' => '_epl_discount_target[]', 'options' => array(5 => epl__('Total Amount')), 'class' => ''), '_epl_discount_target_price_id' => array('input_type' => 'select', 'input_name' => '_epl_discount_target_price_id[]', 'options' => array(), 'class' => ''), '_epl_discount_forms' => array('weight' => 60, 'input_type' => 'checkbox', 'input_name' => '_epl_discount_forms[]', 'label' => epl__('Discount Specific Form'), 'options' => array(), 'second_key' => '[]'), '_epl_discount_forms_per' => array('weight' => 65, 'input_type' => 'select', 'input_name' => '_epl_discount_forms_per[]', 'label' => epl__('Display the form '), 'options' => array(1 => epl__('For each Attendee'), 2 => epl__('Only Once'), 3 => epl__('Do not show any attendee forms'))));
$epl_fields['epl_discount_fields'] = apply_filters('epl_discount_fields', $epl_fields['epl_discount_fields']);
//uasort( $epl_fields['epl_discount_fields'], 'epl_sort_by_weight' );
$epl_fields['epl_discount_rule_fields'] = array('_epl_discount_trigger' => array('input_type' => 'select', 'input_name' => '_epl_discount_trigger[]', 'options' => array(0 => '', 5 => epl__('Total Amount'), 6 => epl__('Total Quantity')), 'class' => ''), '_epl_discount_amount' => array('input_type' => 'text', 'input_name' => '_epl_discount_amount[]', 'label' => epl__('Amount'), 'class' => 'epl_w70'), '_epl_discount_type' => array('input_type' => 'select', 'input_name' => '_epl_discount_type[]', 'label' => epl__('Discount Type'), 'options' => array(5 => epl__('Fixed'), 10 => epl__('Percent')), 'class' => ''), '_epl_discount_max_usage' => array('input_type' => 'text', 'input_name' => '_epl_discount_max_usage[]', 'label' => epl__('Max Use'), 'class' => 'epl_w50'), '_epl_discount_end_date' => array('input_type' => 'text', 'input_name' => '_epl_discount_end_date[]', 'label' => epl__('Until'), 'class' => 'datepicker epl_w80', 'data_type' => 'unix_time'), '_epl_discount_active' => array('input_type' => 'select', 'input_name' => '_epl_discount_active[]', 'label' => epl__('Until'), 'options' => epl_yes_no(), 'default_value' => 0));
$epl_fields['epl_discount_rule_fields'] = apply_filters('epl_discount_rule_fields', $epl_fields['epl_discount_rule_fields']);
$epl_fields['epl_waitlist_fields'] = array('_epl_wailist_active' => array('input_type' => 'select', 'input_name' => '_epl_wailist_active', 'label' => epl__('Enable Waitlist?'), 'options' => epl_yes_no(), 'default_value' => 0), '_epl_waitlist_form' => array('input_type' => 'select', 'input_name' => '_epl_waitlist_form', 'label' => epl__('Form to display'), 'options' => epl_get_list_of_available_forms(), 'help_text' => epl__('The form that will be presented to the registrant.'), 'class' => ''), '_epl_waitlist_max' => array('input_type' => 'text', 'input_name' => '_epl_waitlist_max', 'label' => epl__('Max waitlist size'), 'help_text' => epl__('Leave empty if waitlist has no limit.'), 'class' => 'epl_w50'), '_epl_waitlist_approved_regis_time_limit' => array('input_type' => 'text', 'input_name' => '_epl_waitlist_approved_regis_time_limit', 'label' => epl__('Maximum response time'), 'help_text' => epl__('Amount of time (in hours) a user is given before the approved waitlist link expires.  Example, for 1 day, enter 24, for 3 hours and 30 minutes enter 3.5.'), 'class' => 'epl_w50'), '_epl_waitlist_notification' => array('input_type' => 'select', 'input_name' => '_epl_waitlist_notification', 'options' => get_list_of_available_notifications(), 'label' => epl__('Waitlist confirmation email'), 'help_text' => epl__('Email that is sent to the users after they are placed on a waiting list.'), 'empty_options_msg' => epl__('No email messages found.  Please go to Events Planner > Notification Manager to create notifications.')), '_epl_waitlist_approved_notification' => array('input_type' => 'select', 'input_name' => '_epl_waitlist_approved_notification', 'options' => get_list_of_available_notifications(), 'label' => epl__('Waitlist approved email'), 'help_text' => epl__('Email that is sent to the users once the waitlist is approved.'), 'empty_options_msg' => epl__('No email messages found.  Please go to Events Planner > Notification Manager to create notifications.')));
$epl_fields['epl_waitlist_fields'] = apply_filters('epl_waitlist_fields', $epl_fields['epl_waitlist_fields']);