Advertisement
Guest User

Untitled

a guest
Dec 6th, 2018
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 87.81 KB | None | 0 0
  1. // define all fields in the deg form
  2. function tmi_application_get_meta_box( $meta_boxes ) {
  3.     global $prefix, $pattern_name_with_space, $pattern_name_no_space, $pattern_general, $pattern_school_name, $pattern_contact_nos_list,    $pattern_name_number, $currentyear, $birth_year_range_start, $birth_year_range_stop, $birth_date_range_start_from, $parents_birth_year_range_start, $parents_birth_year_range_stop, $strclassx_yearofpassing,   $strclassx_yearofpassing, $manage_expenses_list, $state_list, $board_list,$btech_diploma_options, $country_list,$degree_year,$blood_group_list,$course_list,$test_centres;
  4.     $xii_fields = array();
  5.  
  6. $group_rule = "true";
  7. $admin_fields = array(
  8.                 array(
  9.                     'type' => 'divider',
  10.                 ),
  11.                 array(
  12.                         'id' => 'application_dossier_id',
  13.                         'type' => 'text',
  14.                         'name' => __( 'Dossier ID: ', 'tmi' ),
  15.                         'attributes' =>  array(
  16.                             'readonly' => true,
  17.                             'pattern' => $pattern_name_number,
  18.                         ),
  19.                         'required'  => false,
  20.                         'columns' => 4,
  21.                         ),
  22.                 array(
  23.                         'id' => 'application_enrollment_number',
  24.                         'type' => 'text',
  25.                         'name' => __( 'Enrollment Number: ', 'tmi' ),
  26.                         'attributes' =>  array(
  27.                             'pattern' => $pattern_general,
  28.                         ),
  29.                         'required'  => false,
  30.                         'columns' => 4,
  31.                         ),
  32.                 array(
  33.                     'type' => 'divider',
  34.                 ),
  35.                 array(
  36.                     'id'     => 'application_payment_information',
  37.                     'name' => __( 'PAYMENT INFORMATION: ', 'tmi' ),
  38.                     'label_description' => '(Office use only)',
  39.                     // Group field
  40.                     'type'   => 'group',
  41.                     // Clone whole group?
  42.                     'clone'  => false,
  43.                     'columns' => 12,
  44.                     'collapsible' => false,
  45.                      // Sub-fields
  46.                     'fields' => array(
  47.                         array(
  48.                             'id' => 'payment_status',
  49.                             'type' => 'radio',
  50.                             'name' => __( 'Payment Status: ', 'tmi' ),
  51.                             'options' => array(
  52.                                 'Paid' => 'Paid',
  53.                                 'Pending' => 'Pending',
  54.                             ),
  55.                             'std' => 'Pending',
  56.                             'collapse' => false,
  57.                             'required'  => false,
  58.                             'columns' => 4,
  59.                         ),
  60.                         array(
  61.                             'id' => 'payment_mode',
  62.                             'type' => 'radio',
  63.                             'name' => __( 'Payment Mode: ', 'tmi' ),
  64.                             'options' => array(
  65.                                 'Online' => 'Online',
  66.                                 'Offline' => 'Offline',
  67.                             ),
  68.                             'std' => 'Offline',
  69.                             'collapse' => false,
  70.                             'required'  => false,
  71.                             'columns' => 4,
  72.                         ),
  73.                         array(
  74.                             'id' => 'amount',
  75.                             'type' => 'number',
  76.                             'name' => __( 'Amount: ', 'tmi' ),
  77.                             'required'  => false,
  78.                             'columns' => 6,
  79.                         ),
  80.                         array(
  81.                             'id' => 'transaction_id',
  82.                             'type' => 'text',
  83.                             'name' => __( 'Transaction ID: ', 'tmi' ),
  84.                             'desc' => '(exists only in online payments)',
  85.                             'attributes' =>  array(
  86.                                 'readonly' => true,
  87.                                 'pattern' => $pattern_general,
  88.                             ),
  89.                             'columns' => 6,
  90.                         ),
  91.                         array(
  92.                             'id' => 'notes',
  93.                             'type' => 'textarea',
  94.                             'name' => __( 'Notes: ', 'tmi' ),
  95.                             'attributes' =>  array(
  96.                                 'pattern' => $pattern_general,
  97.                             ),
  98.                             'required'  => false,
  99.                             'size' => 100,
  100.                             'columns' => 12,
  101.                         ),
  102.                     )
  103.                 )
  104.                 );
  105.     if (is_admin()) {
  106.         $display_admin_fields = $admin_fields;
  107.     }
  108. //$meta_boxes = array();
  109. $meta_boxes[] = array(
  110.     'id' => 'deg-entry',
  111.     'title' => __( 'APPLICATION Course Application Form (Fields marked * are mandatory)', 'tmi' ),
  112.     'post_types' => array( 'tmideg' ),
  113.     'context' => 'advanced',
  114.     'priority' => 'default',
  115.     'autosave' => true,
  116.     'validation' => array(
  117.         'rules' => array(
  118.                 'examination_test_centres' =>array(
  119.                     'required' => true
  120.                 ),
  121.                 'application_enrolled_course' =>array(
  122.                     'required' => true
  123.                 ),
  124.                 'application_personal_full_name'=>array(
  125.                     'required' => true
  126.                 ),
  127.                 'application_personal[first_name]' => array('required' => true),
  128.                 'application_personal[last_name]' => array('required' => true),
  129.                 'application_personal[mothers_name]' => array('required' => true),
  130.                 'application_personal[xii_marksheet_full_name]' => array('required' => true),
  131.                 'application_personal[gender]' => array('required' => true),
  132.                 'application_personal[marital_status]' => array('required' => true),
  133.  
  134.                 'application_personal[date_of_birth]'=>array('required' => true),
  135.                 'application_personal[place_of_birth]'=>array('required' => true),
  136.                 'application_personal[nationality]'=>array(
  137.                     'required' => true
  138.                 ),
  139.                 'application_personal[personal_identification_mark]' => array('required' => true,),
  140.                 'application_communication[address]'=>array('required' => true),
  141.                 'application_communication[country]'=>array('required' => true),
  142.                 'application_communication[city]'=>array('required' => true),
  143.                 'application_communication[state]'=>array('required' => true),
  144.                 'application_communication[pin]'=>array('required' => true),
  145.                 'application_communication_email'=>array('required' => true),
  146.                 'application_communication[mobile]'=>array(
  147.                     'required' => true,
  148.                     'checkmobileno' => true,
  149.                 ),
  150.                 'application_communication_email'=>array('required' => true),
  151.                 'application_user_secret'=>array('required' => true),
  152.                 'application_guardias_particulars[name_of_father]'=>array('required' => true),
  153.                 'application_guardias_particulars[parents_occupation]'=>array('required' => true),
  154.  
  155.                 'application_guardias_particulars[address]'=>array('required' => true),
  156.                 'application_guardias_particulars[country]'=>array('required' => true),
  157.                 'application_guardias_particulars[city]'=>array('required' => true),
  158.                 'application_guardias_particulars[state]'=>array('required' => true),
  159.                 'application_guardias_particulars[pin]'=>array('required' => true),
  160.                 'application_guardias_particulars[mobile]'=>array('required' => true),
  161.                 'application_guardias_particulars[parents_email]'=>array('required' => true),
  162.  
  163.                 'application_academic_record[class_x][year_of_passing]'=>array('required' => true),
  164.                 'application_academic_record[class_x][board]'=>array('required' => true),
  165.                 'application_academic_record[class_x][school]'=>array('required' => true),
  166.                 'application_academic_record[class_x][city]'=>array('required' => true),
  167.                 'application_academic_record[class_x][english]'=>array('required' => true),
  168.                 'application_academic_record[class_x][aggregate_percentage]'=>array('required' => true),
  169.                 'application_academic_record[class_xii][year_of_passing]'=>array('required' => true),
  170.                 'application_academic_record[class_xii][board]'=>array('required' => true),
  171.                 'application_academic_record[class_xii][school]'=>array('required' => true),
  172.                 'application_academic_record[class_xii][city]'=>array('required' => true),
  173.                 'application_academic_record[class_xii][english]'=>array('required' => true),
  174.                 'application_academic_record[class_xii][aggregate_percentage]'=>array('required' => false),
  175.                 'application_academic_record[class_xii][institution_code]'=>array('required' => true),
  176.                 'application_academic_record[class_xii][address_of_school_college]'=>array('required' => true),
  177.                 'application_academic_record[class_xii][pin]'=>array('required' => true),
  178.                 'application_academic_record[class_xii][school_email]'=>array('required' => true),
  179.                 'application_academic_record[class_xii][institution_code]'=>array('required' => true),
  180.                 'application_academic_record[class_xii][address_of_school_college]'=>array('required' => true),
  181.                 'application_academic_record[class_xii][pin]'=>array('required' => true),
  182.                 'application_academic_record[class_xii][school_email]'=>array('required' => true),
  183.  
  184.                 'academic_record_class_xii_year_of_passing'=>array(
  185.                     'checkXIIAllfieldsEmpty' => true
  186.                 ),
  187.                 'academic_record_class_xii_board'=>array(
  188.                     'checkXIIAllfieldsEmpty' => true
  189.                 ),
  190.                 'academic_record_class_xii_english'=>array(
  191.                     'checkXIIAllfieldsEmpty' => true
  192.                 ),
  193.                 'academic_record_class_xii_aggregate_percentage'=>array(
  194.                     'checkXIIAllfieldsEmpty' => true
  195.                 ),
  196.                 'application_your_wish_before_joining'=>array(
  197.                     'required' => true
  198.                 ),
  199.                 'application_degree_is_good_option'=>array(
  200.                     'required' => true
  201.                 ),
  202.                 'your_wish'=>array(
  203.                     'required' => true
  204.                 ),
  205.                 'what_are_your_hobbies'=>array(
  206.                     'required' => true
  207.                 ),
  208.                 'what_are_your_strengths'=>array(
  209.                     'required' => true
  210.                 ),
  211.                 'what_are_your_weaknesses'=>array(
  212.                     'required' => true
  213.                 ),
  214.                 'meet_the_expenses[]'=>array(
  215.                     'required' => true
  216.                 ),
  217.  
  218.                 'academic_record_class_x_year_of_passing' =>array(
  219.                     'yeardifference' => true
  220.                 ),
  221.                 'application_declaration'=>array( 'required' => true  ),      
  222.         ),
  223.         'messages' => array(
  224.             'academic_record_class_xii_year_of_passing' => array(
  225.                 'yeardifference' => 'The difference passing year between Class X year & Class XII should be at least 2 years'
  226.             ),
  227.         ),
  228.     ),
  229.     'fields' => array(
  230.                  array(
  231.                     'id'   => 'application_current_year',
  232.                     'type' => 'hidden',
  233.                     // Hidden field must have predefined value
  234.                     'std'  => $currentyear,
  235.                 ),
  236.                  array(
  237.                     'id'   => 'application_verification_id',
  238.                     'type' => 'hidden',
  239.                     // Hidden field must have predefined value
  240.                     'std'  => $currentyear,
  241.                 ),
  242.                 array(
  243.                     'id' => 'application_enrolled_course',
  244.                     'type' => 'select',
  245.                     'name' => __( 'SELECT COURSE: ', 'tmi'),
  246.                     'required'  => true,
  247.                     'columns' => 6,
  248.                     'size' => 75,
  249.                     'options' => $course_list,
  250.                 ),
  251.                 array(
  252.                     'id' => 'examination_test_centre',
  253.                     'type' => 'select',
  254.                     'name' => __( 'Select Test Centre: ', 'tmi'),
  255.                     'required'  => true,
  256.                     'columns' => 6,
  257.                     'size' => 75,
  258.                     'options' => $test_centres,
  259.                 ),
  260.                 array(
  261.                     'type' => 'divider',
  262.                 ),
  263.                 array(
  264.                     'id'     => 'application_personal',
  265.                     'name' => __( 'PERSONAL PARTICULARS: ', 'tmi' ),
  266.                     // Group field
  267.                     'type'   => 'group',
  268.                     // Clone whole group?
  269.                     'clone'  => false,
  270.                     'columns' => 12,
  271.                     'collapsible' => false,
  272.                      // Sub-fields
  273.                     'fields' => array(
  274.                         array(
  275.                             'id' => 'first_name',
  276.                             'type' => 'text',
  277.                             'name' => __( 'First Name: ', 'tmi' ),
  278.                             'attributes' =>  array(
  279.                                 'pattern' => $pattern_name_no_space,
  280.                             ),
  281.                             'required'  => true,
  282.                             'columns' => 4,
  283.                         ),
  284.                         array(
  285.                             'id' => 'last_name',
  286.                             'type' => 'text',
  287.                             'name' => __( 'Surname: ', 'tmi' ),
  288.                             'attributes' =>  array(
  289.                                 'pattern' => $pattern_name_no_space,
  290.                             ),
  291.                             'required'  => true,
  292.                             'columns' => 4,
  293.                         ),
  294.                         array(
  295.                             'id' => 'middle_name',
  296.                             'type' => 'text',
  297.                             'name' => __( 'Middle Name: ', 'tmi' ),
  298.                             'attributes' =>  array(
  299.                                 'pattern' => $pattern_name_no_space,
  300.                             ),
  301.                             'required'  => false,
  302.                             'columns' => 4,
  303.                         ),
  304.                         array(
  305.                             'id' => 'mothers_name',
  306.                             'type' => 'text',
  307.                             'name' => __( 'Mother Name: ', 'tmi' ),
  308.                             'attributes' =>  array(
  309.                                 'pattern' => $pattern_name_with_space,
  310.                             ),
  311.                             'required'  => true,
  312.                             'size' => 100,
  313.                             'columns' => 12,
  314.                         ),
  315.                         array(
  316.                             'id' => 'xii_marksheet_full_name',
  317.                             'type' => 'text',
  318.                             'name' => __( 'Full Name as on Class XII Marksheet/Pass Certificate: ', 'tmi' ),
  319.                             'attributes' =>  array(
  320.                                 'pattern' => $pattern_name_with_space,
  321.                             ),
  322.                             'required'  => true,
  323.                             'size' => 100,
  324.                             'columns' => 12,
  325.                         ),
  326.                         array(
  327.                             'id' => 'gender',
  328.                             'name' => __( 'Gender: ', 'tmi' ),
  329.                             'type' => 'radio',
  330.                             'placeholder' => '',
  331.                             'options' => array(
  332.                                 '1' => 'Male',
  333.                                 '2' => 'Female',
  334.                             ),
  335.                             'std' => '1',
  336.                             'collapse' => false,
  337.                             'required'  => true,
  338.                             'columns' => 6,
  339.                         ),
  340.                         array(
  341.                             'id' => 'marital_status',
  342.                             'name' => __( 'Marital Status: ', 'tmi' ),
  343.                             'type' => 'radio',
  344.                             'attributes' => array(
  345.                                 'class' => 'application_marital_status',
  346.                                 'data-rule-checkmarital' => "true",
  347.                             ),
  348.                             'placeholder' => '',
  349.                             'options' => array(
  350.                                 '1' => 'Single',
  351.                                 '2' => 'Married',
  352.                             ),
  353.                             'inline' => true,
  354.                             'std' => '1',
  355.                             'collapse' => false,
  356.                             'columns' => 6,
  357.                         ),
  358.                         array(
  359.                             'id' => 'date_of_birth',
  360.                             'type' => 'date',
  361.                             'name' => __( 'Date of Birth: ', 'tmi' ),
  362.                             'js_options' => array(
  363.                                 'dateFormat' => 'mm/dd/yy',
  364.                                 'minDate' =>  $birth_date_range_start_from,  // 24 years less
  365.                                 'maxDate' => "-18Y",                     // 6 years less
  366.                                 'yearRange' => "$birth_year_range_start:$birth_year_range_stop",
  367.                                 'changeMonth' => true,
  368.                                 'changeYear' => true,
  369.                             ),
  370.                             'attributes' => array(
  371.                                 'required'  => true,
  372.                                 'readonly'  => true,
  373.                             ),
  374.                             'columns' => 6,
  375.                         ),
  376.                         array(
  377.                             'id' => 'nationality',
  378.                             'type' => 'text',
  379.                             'name' => __( 'Nationality: ', 'tmi' ),
  380.                             'attributes' =>  array(
  381.                                 'pattern' => $pattern_name_no_space,
  382.                                 'maxlength' => 11,
  383.                             ),
  384.                             'required'  => true,
  385.                             'columns' => 6,
  386.                         ),
  387.                         array(
  388.                             'id' => 'place_of_birth',
  389.                             'type' => 'text',
  390.                             'name' => __( 'Place of Birth: ', 'tmi' ),
  391.                             'attributes' =>  array(
  392.                                 'pattern' => $pattern_school_name,
  393.                                 'maxlength' => 11,
  394.                             ),
  395.                             'required'  => true,
  396.                             'columns' => 6,
  397.                         ),
  398.                         array(
  399.                             'id' => 'personal_identification_mark',
  400.                             'type' => 'text',
  401.                             'name' => __( 'Personal Identification mark: ', 'tmi' ),
  402.                             'attributes' =>  array(
  403.                                 'pattern' => $pattern_name_with_space,
  404.                             ),
  405.                             'required' => true,
  406.                             'columns' => 6,
  407.                         ),
  408.                         array(
  409.                             'id' => 'blood_group',
  410.                             'type' => 'radio',
  411.                             'inline' => true,
  412.                             'name' => __( 'Blood Group: ', 'tmi'),
  413.                             'options' => $blood_group_list,
  414.                             'std' => '1',
  415.                             'collapse' => false,
  416.                             'required'  => true,
  417.                             'columns' => 12,
  418.                         ),
  419.                         array(
  420.                             'id' => 'your_photograph',
  421.                             'type' => 'image',
  422.                             'name' => __( 'Upload your photograph: ', 'tmi' ),
  423.                             'max_file_uploads' => '1',
  424.                             'columns' => 4,
  425.                         ),
  426.                         array(
  427.                             'id' => 'your_birth_certificate',
  428.                             'type' => 'file',
  429.                             'name' => __( 'Upload your Birth certificate: ', 'tmi' ),
  430.                             'max_file_uploads' => '1',
  431.                             'columns' => 4,
  432.                         ),
  433.                         array(
  434.                             'id' => 'your_medical_report',
  435.                             'type' => 'file',
  436.                             'name' => __( 'Upload your Medical Document: ', 'tmi' ),
  437.                             'max_file_uploads' => '1',
  438.                             'columns' => 4,
  439.                         ),
  440.                     ),
  441.                 ),
  442.                 array(
  443.                     'type' => 'divider',
  444.                 ),
  445.                 array(
  446.                     'id'     => 'application_communication',
  447.                     'name' => __( 'Addresses For Communication', 'tmi' ),
  448.                     // Group field
  449.                     'type'   => 'group',
  450.                     // Clone whole group?
  451.                     'clone'  => false,
  452.                     'collapsible' => false,
  453.                      // Sub-fields
  454.                     'fields' => array(
  455.  
  456.                         array(
  457.                             'id' => 'address',
  458.                             'type' => 'textarea',
  459.                             'name' => __( 'Address: ', 'tmi'),
  460.                             'attributes' =>  array(
  461.                                 'pattern' => $pattern_general,
  462.                             ),
  463.                             'required'  => true,
  464.                             'size'=>100,
  465.                             'columns' => 12,
  466.                         ),
  467.                         array(
  468.                             'id' => 'country',
  469.                             'type' => 'select',
  470.                             'name' => __( 'Country: ', 'tmi'),
  471.                             'required'  => true,
  472.                             'columns' => 4,
  473.                             'std' => 'India',
  474.                             'options' => $country_list,
  475.                         ),
  476.                         array(
  477.                             'id' => 'state',
  478.                             'type' => 'select',
  479.                             'name' => __( 'State: ', 'tmi'),
  480.                             'required'  => true,
  481.                             'columns' => 4,
  482.                             'options' => $state_list,
  483.                         ),
  484.                         array(
  485.                             'id' => 'city',
  486.                             'type' => 'text',
  487.                             'name' => __( 'City / District: ', 'tmi'),
  488.                             'attributes' =>  array(
  489.                                 'pattern' => $pattern_name_with_space,
  490.                             ),
  491.                             'required'  => true,
  492.                             'columns' => 4,
  493.                         ),
  494.                         array(
  495.                             'type' => 'custom_html',
  496.                             'columns' => 12,
  497.                             'std' => '',
  498.                         ),
  499.                         array(
  500.                             'id' => 'pin',
  501.                             'type' => 'text',
  502.                             'name' => __( 'PIN: ', 'tmi'),
  503.                             'attributes' =>  array(
  504.                                 'pattern' => $pattern_name_number,
  505.                                 'maxlength' => '6',
  506.                             ),
  507.                             'required'  => true,
  508.                             'columns' => 4,
  509.                         ),
  510.                         array(
  511.                             'id' => 'tel_no_with_std_code',
  512.                             'type' => 'text',
  513.                             'desc' => '(Start STD code with zero)',
  514.                             'name' => 'Telephone No. with STD code: ',
  515.                             'attributes' => array(
  516.                                 'maxlength' => '15',
  517.                             ),
  518.                             'columns' => 4,
  519.                         ),
  520.                         array(
  521.                             'id' => 'mobile',
  522.                             'type' => 'number',
  523.                             'name' => __( 'Mobile: ', 'tmi'),
  524.                             'required'  => true,
  525.                             'columns' => 4,
  526.                             'attributes' => array(
  527.                                 'class' => 'input-no-spinner',
  528.                                 'pattern' => '.{10}',
  529.                             ),
  530.                             'desc' => '(Do not start with zero. For foreign numbers write the ISD code as part of the number.)',
  531.                         ),
  532.                         array(
  533.                             'id' => 'aadhar_card_number',
  534.                             'type' => 'text',
  535.                             'name' => __( 'Aadhar Card No.: ', 'tmi'),
  536.                             'required'  => false,
  537.                             'columns' => 4,
  538.                             'attributes' => array(
  539.                                 'pattern' => '.{12}',
  540.                             ),
  541.                         ),
  542.                     ),
  543.                 ),
  544.                 array(
  545.                         'id' => 'application_communication_email',
  546.                         'type' => 'email',
  547.                         'name' => __( 'E-mail: ', 'tmi'),
  548.                         'required'  => true,
  549.                         'columns' => 12,
  550.                         'desc' => 'Enter a valid Email, The Email ID that you choose will enable you to Login / communicate with TMI about your application.',
  551.                         'attributes' => array(
  552.                             'data-rule-checkemailexists' => (!is_admin() ? "true" : "false"),
  553.                         ),
  554.                 ),
  555.                 array(
  556.                     'type' => 'divider',
  557.                 ),
  558.                 array(
  559.                     'id'     => 'application_guardias_particulars',
  560.                     'name' => __( 'Guardian\'s Particulars: ', 'tmi' ),
  561.                     // Group field
  562.                     'type'   => 'group',
  563.                     'clone'  => false,
  564.                     'collapsible' => false,
  565.                     'columns' => 12,
  566.                     'fields' => array(
  567.                         array(
  568.                             'id' => 'name_of_father',
  569.                             'type' => 'text',
  570.                             'name' => __( 'Name of Father/Guardian: ', 'tmi' ),
  571.                             'attributes' =>  array(
  572.                                 'pattern' => $pattern_name_with_space,
  573.                                 'maxlength' => 35,
  574.                             ),
  575.                             'required'  => true,
  576.                             'columns' => 6,
  577.                         ),
  578.                         array(
  579.                             'id' => 'parent_date_of_birth',
  580.                             'type' => 'date',
  581.                             'name' => __( 'Parents Date of Birth: ', 'tmi' ),
  582.                             'js_options' => array(
  583.                                 'dateFormat' => 'mm/dd/yy',
  584.                                 'minDate' =>  "-72Y",    // 24 years less
  585.                                 'maxDate' => "-25Y",                     // 6 years less
  586.                                 'yearRange' => "$parents_birth_year_range_start:$parents_birth_year_range_stop",
  587.                                 'changeMonth' => true,
  588.                                 'changeYear' => true,
  589.                             ),
  590.                             'attributes' => array(
  591.                                 'required'  => true,
  592.                                 'readonly'  => true,
  593.                             ),
  594.                             'columns' => 6,
  595.                         ),
  596.                         array(
  597.                             'id' => 'parents_occupation',
  598.                             'type' => 'text',
  599.                             'name' => __( 'Father\'s/Guardian\'s Occupation/Designation: ', 'tmi' ),
  600.                             'attributes' =>  array(
  601.                                 'pattern' => $pattern_general,
  602.                                 'maxlength' => 35,
  603.                             ),
  604.                             'required'  => true,
  605.                             'columns' => 6,
  606.                         ),
  607.                         array(
  608.                             'type' => 'custom_html',
  609.                             'columns' => 12,
  610.                             'std' => '<strong>Father\'s/Guardian\'s Office</strong>:',
  611.                         ),
  612.                         array(
  613.                             'id' => 'address',
  614.                             'type' => 'textarea',
  615.                             'name' => __( 'Address: ', 'tmi'),
  616.                             'attributes' =>  array(
  617.                                 'pattern' => $pattern_general,
  618.                             ),
  619.                             'required'  => true,
  620.                             'columns' => 12,
  621.                         ),
  622.                         array(
  623.                             'type' => 'custom_html',
  624.                             'columns' => 12,
  625.                             'std' => '',
  626.                         ),
  627.                         array(
  628.                             'id' => 'country',
  629.                             'type' => 'select',
  630.                             'name' => __( 'Country: ', 'tmi'),
  631.                             'required'  => true,
  632.                             'columns' => 6,
  633.                             'std' => 'India',
  634.                             'options' => $country_list,
  635.                         ),
  636.                         array(
  637.                             'id' => 'state',
  638.                             'type' => 'select',
  639.                             'name' => __( 'State: ', 'tmi'),
  640.                             'required'  => true,
  641.                             'columns' => 6,
  642.                             'options' => $state_list,
  643.                         ),
  644.                         array(
  645.                             'id' => 'city',
  646.                             'type' => 'text',
  647.                             'name' => __( 'City / District: ', 'tmi'),
  648.                             'attributes' =>  array(
  649.                                 'pattern' => $pattern_name_with_space,
  650.                             ),
  651.                             'required'  => true,
  652.                             'columns' => 6,
  653.                         ),
  654.                         array(
  655.                             'id' => 'pin',
  656.                             'type' => 'text',
  657.                             'name' => __( 'PIN: ', 'tmi'),
  658.                             'attributes' =>  array(
  659.                                 'pattern' => $pattern_name_number,
  660.                                 'maxlength' => '6',
  661.                             ),
  662.                             'required'  => true,
  663.                             'columns' => 6,
  664.                         ),
  665.                         array(
  666.                             'id' => 'tel_no_with_std_code',
  667.                             'type' => 'number',
  668.                             'desc' => '(Start STD code with zero.)',
  669.                             'name' => 'Telephone No. with STD code: ',
  670.                             'attributes' => array(
  671.                                 'class' => 'input-no-spinner',
  672.                                 'maxlength' => '15',
  673.                             ),
  674.                             'columns' => 6,
  675.                         ),
  676.                         array(
  677.                             'id' => 'mobile',
  678.                             'type' => 'number',
  679.                             'name' => __( 'Mobile: ', 'tmi'),
  680.                             'required'  => true,
  681.                             'columns' => 6,
  682.                             'attributes' => array(
  683.                                 'class' => 'input-no-spinner',
  684.                                 'pattern' => '.{10}',
  685.                             ),
  686.                             'desc' => '(Do not start with zero. For foreign numbers write the ISD code as part of the number.)',
  687.                         ),
  688.                         array(
  689.                             'id' => 'fax',
  690.                             'type' => 'number',
  691.                             'desc' => '(Start STD code with zero.)',
  692.                             'name' => 'Fax: ',
  693.                             'attributes' => array(
  694.                                 'class' => 'input-no-spinner',
  695.                                 'maxlength' => '15',
  696.                             ),
  697.                             'columns' => 6,
  698.                         ),
  699.                         array(
  700.                             'id' => 'parents_email',
  701.                             'type' => 'email',
  702.                             'name' => __( 'E-mail: ', 'tmi'),
  703.                             'required'  => true,
  704.                             'columns' => 6,
  705.                             'desc' => '(Enter a valid Email address.)',
  706.                         ),
  707.  
  708.                     ),
  709.                 ),
  710.                 array(
  711.                     'type' => 'divider',
  712.                 ),
  713.                 array(
  714.                     'id'     => 'application_academic_record',
  715.                     'name' => __( 'ACADEMIC RECORD: ', 'tmi' ),
  716.                     // Group field
  717.                     'type'   => 'group',
  718.                     'clone'  => false,
  719.                     'collapsible' => false,
  720.                     'columns' => 12,
  721.                     'fields' => array(
  722.                         array(
  723.                             'id'     => 'class_x',
  724.                             'name' => __( 'Class X:-', 'tmi' ),
  725.                             // Group field
  726.                             'type'   => 'group',
  727.                             'clone'  => false,
  728.                             'collapsible' => false,
  729.                             'columns' => 6,
  730.  
  731.                             'fields' => array(
  732.                                     array(              
  733.                                             'id' => 'year_of_passing',
  734.                                             'type' => 'select',
  735.                                             'name' => __( 'Year of Passing: ', 'tmi'),
  736.                                             'class' => 'x_passing',
  737.                                             'required'  => true,
  738.                                             'columns' => 12,
  739.                                             'options' => $strclassx_yearofpassing,
  740.                                     ),
  741.                                     array(              
  742.                                             'id' => 'board',
  743.                                             'type' => 'select',
  744.                                             'name' => __( 'Board: ', 'tmi'),
  745.                                             'required'  => true,
  746.                                             'columns' => 12,
  747.                                             'options' => $board_list,
  748.                                     ),
  749.                                     array(              
  750.                                             'id' =>'school',
  751.                                             'type' => 'text',
  752.                                             'name' => __( 'School: ', 'tmi'),
  753.                                             'columns' => 12,
  754.                                             'size' => 50,
  755.                                             'attributes' => array(
  756.                                                 'pattern' => $pattern_school_name,
  757.                                             ),
  758.                                             'required'  => true,
  759.                                     ),
  760.                                     array(
  761.                                             'id' => 'city',
  762.                                             'type' => 'text',
  763.                                             'name' => __( 'City: ', 'tmi'),
  764.                                             'attributes' =>  array(
  765.                                                 'pattern' => $pattern_name_with_space,
  766.                                             ),
  767.                                             'required'  => true,
  768.                                             'columns' => 12,
  769.                                     ),
  770.                                     array(              
  771.                                             'id' => 'english',
  772.                                             'type' => 'number',
  773.                                             'min' => 0,
  774.                                             'max' => 100,
  775.                                             'name' => __( 'English:% ', 'tmi'),
  776.                                             'attributes' => array(
  777.                                                 'maxlength' => 3,
  778.                                                 'size' => 30,
  779.                                             ),
  780.                                             'required'  => true,
  781.                                             'columns' => 12,
  782.                                     ),
  783.                                     array(              
  784.                                             'id' => 'aggregate_percentage',
  785.                                             'type' => 'number',
  786.                                             'min' => 0,
  787.                                             'max' => 100,
  788.                                             'desc' => 'for all subjects',
  789.                                             'attributes' => array(
  790.                                                 'maxlength' => 3,
  791.                                             ),
  792.                                             'name' => __( 'Percentage of Marks Secured (Aggregate): ', 'tmi'),
  793.                                             'required'  => true,
  794.                                             'columns' => 12,
  795.                                     ),
  796.                                     array(
  797.                                         'id' => 'class_x_marksheet',
  798.                                         'type' => 'file',
  799.                                         'name' => __( 'Upload your 10th marksheet: ', 'tmi' ),
  800.                                         'desc' => ' ',
  801.                                         'max_file_uploads' => '1',
  802.                                         'columns' => 12,
  803.                                     ),
  804.                                     array(
  805.                                         'id' => 'school_leaving_certificate',
  806.                                         'type' => 'file',
  807.                                         'name' => __( 'Upload your school leaving certificate: ', 'tmi' ),
  808.                                         'max_file_uploads' => '1',
  809.                                         'columns' => 12,
  810.                                     ),
  811.  
  812.                             ),
  813.                         ),
  814.                         array(
  815.                             'id'     => 'class_xii',
  816.                             'name' => __( 'Class XII:-', 'tmi' ),
  817.                             // Group field
  818.                             'type'   => 'group',
  819.                             'clone'  => false,
  820.                             'collapsible' => false,
  821.                             'class' => 'xii-class-details',
  822.                             'columns' => 6,
  823.                             'fields' => array(
  824.                                 array(              
  825.                                         'id' => 'year_of_passing',
  826.                                         'type' => 'select',
  827.                                         'name' => __( 'Year of Passing: ', 'tmi'),
  828.                                         'class' => 'ClassXII xii_passing',
  829.                                         'attributes' => array(
  830.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  831.                                             'data-rule-yeardifference' => array('#academic_record_class_x_year_of_passing', '2', 'greater than'),
  832.                                             'concession' => '0',
  833.                                         ),
  834.                                         'columns' => 12,
  835.                                         'options' => $strclassx_yearofpassing,
  836.                                 ),
  837.                                 array(              
  838.                                         'id' => 'board',
  839.                                         'type' => 'select',
  840.                                         'name' => __( 'Board: ', 'tmi'),
  841.                                         'columns' => 12,
  842.                                         'class' => 'ClassXII',
  843.                                         'attributes' => array(
  844.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  845.                                         ),
  846.                                         'options' => $board_list,
  847.                                 ),
  848.                                 array(              
  849.                                         'id' =>'school',
  850.                                         'type' => 'text',
  851.                                         'name' => __( 'School/College Name: ', 'tmi'),
  852.                                         'class' => 'ClassXII',
  853.                                         'size' => 50,
  854.                                         'columns' => 12,
  855.                                         'attributes' => array(
  856.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  857.                                             'pattern' => $pattern_school_name,
  858.                                         ),
  859.                                         'required'  => true,
  860.                                 ),
  861.                                 array(
  862.                                         'id' => 'city',
  863.                                         'type' => 'text',
  864.                                         'name' => __( 'City: ', 'tmi'),
  865.                                         'class' => 'ClassXII',
  866.                                         'attributes' =>  array(
  867.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  868.                                             'pattern' => $pattern_name_with_space,
  869.                                         ),
  870.                                         'required'  => true,
  871.                                         'columns' => 12,
  872.                                 ),
  873.                                 array(              
  874.                                         'id' =>'roll_number',
  875.                                         'type' => 'text',
  876.                                         'name' => __( 'Board Roll No./Seat No.: ', 'tmi'),
  877.                                         'size' => 25,
  878.                                         'columns' => 12,
  879.                                         'attributes' => array(
  880.                                             'pattern' => $pattern_general,
  881.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  882.                                         ),
  883.                                         'required'  => false,
  884.                                 ),
  885.                                 array(              
  886.                                         'id' => 'aggregate_percentage',
  887.                                         'type' => 'number',
  888.                                         'min' => 0,
  889.                                         'max' => 100,
  890.                                         'desc' => 'for all subjects.Note: If you do not know you class XII marks at this time, please leave the section blank and submit the 10+2 marksheet (which contains PCM marks) to TMI immediately after declaration of results by post/fax/courier/email. You can also fill up the marks online by logging in and updating this form later.',
  891.                                         'class' => 'ClassXII',
  892.                                         'attributes' => array(
  893.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  894.                                             'maxlength' => 3,
  895.                                         ),
  896.                                         'name' => __( 'Percentage of Marks Secured (Aggregate): ', 'tmi'),
  897.                                         'columns' => 12,
  898.                                 ),
  899.                                 array(
  900.                                     'id' => 'institution_code',
  901.                                     'type' => 'text',
  902.                                     'name' => __( 'School/College Code: ', 'tmi'),
  903.                                     'class' => 'ClassXII',
  904.                                     'attributes' =>  array(
  905.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  906.                                         'pattern' => $pattern_name_number,
  907.                                     ),
  908.                                     'required'  => true,
  909.                                     'columns' => 12,
  910.                                 ),
  911.                                 array(
  912.                                     'id' => 'address_of_school_college',
  913.                                     'type' => 'textarea',
  914.                                     'class' => 'ClassXII',
  915.                                     'name' => __( 'Address of School/College: ', 'tmi'),
  916.                                     'attributes' =>  array(
  917.                                         'pattern' => $pattern_general,
  918.                                         'data-rule-checkXIIAllfieldsEmpty' => "true",
  919.                                     ),
  920.                                     'required'  => true,
  921.                                     'columns' => 12,
  922.                                 ),
  923.                                 array(
  924.                                     'id' => 'pin',
  925.                                     'type' => 'text',
  926.                                     'name' => __( 'PIN: ', 'tmi'),
  927.                                     'class' => 'ClassXII',
  928.                                     'attributes' =>  array(
  929.                                         'pattern' => $pattern_name_number,
  930.                                         'data-rule-checkXIIAllfieldsEmpty' => "true",
  931.                                         'maxlength' => '6',
  932.                                     ),
  933.                                     'required'  => true,
  934.                                     'columns' => 12,
  935.                                 ),
  936.                                 array(
  937.                                     'id' => 'contact_numbers',
  938.                                     'type' => 'text',
  939.                                     'label_description' => '',
  940.                                     'name' => 'Contact Nos: ',
  941.                                     'attributes' => array(
  942.                                         'pattern' => $pattern_contact_nos_list,
  943.                                         'class' => 'input-no-spinner',
  944.                                         'maxlength' => '65',
  945.                                     ),
  946.                                     'size' => 50,
  947.                                     'columns' => 12,
  948.                                 ),
  949.                                 array(
  950.                                         'id' => 'school_email',
  951.                                         'type' => 'email',
  952.                                         'class' => 'ClassXII',
  953.                                         'name' => __( 'E-mail: ', 'tmi'),
  954.                                         'required'  => true,
  955.                                         'columns' => 12,
  956.                                         'size' => 50,
  957.                                         'attributes' => array(
  958.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  959.                                         ),
  960.                                 ),
  961.                             ),
  962.                         ),
  963.                         array(
  964.                             'type' => 'divider',
  965.                         ),
  966.                         array(
  967.                             'id'     => 'marks_10_2',
  968.                             'name' => __( 'Details of Marks Secured in (10+2) Examination: ', 'tmi' ),
  969.                             // Group field
  970.                             'type'   => 'group',
  971.                             'class'  => 'xii-marks-table-group',
  972.                             'clone'  => false,
  973.                             'label_description' => 'Note: If you do not know you class XII marks at this time, please leave the section blank and submit the 10+2 marksheet (which contains PCM marks) to TMI immediately after declaration of results by post/fax/courier/email. You can also fill up the marks online by logging in and updating this form later.',
  974.                             'collapsible' => false,
  975.                             'columns' => 12,
  976.                             'fields' => array(                          
  977.                                     array(
  978.                                         'type' => 'heading',
  979.                                         'name' => '<strong>Subjects</strong>',
  980.                                         'columns' => 3,
  981.                                     ),
  982.                                     array(
  983.                                         'type' => 'heading',
  984.                                         'name' => '<strong>Maximum Marks</strong>',
  985.                                         'columns' => 3,
  986.                                     ),
  987.                                     array(
  988.                                         'type' => 'heading',
  989.                                         'name' => '<strong>Marks Secured</strong>',
  990.                                         'columns' => 3,
  991.                                     ),
  992.                                     array(
  993.                                         'type' => 'heading',
  994.                                         'name' => '<strong>Percentage (%)</strong>',
  995.                                         'columns' => 3,
  996.                                     ),
  997.                                     array(
  998.                                         'type' => 'custom_html',
  999.                                         'name' => 'Physics',
  1000.                                         'columns' => 3,
  1001.                                     ),
  1002.                                     array(
  1003.                                         'id'    => 'max_marks_physics_10_2',
  1004.                                         'type' => 'number',
  1005.                                         'class' => 'ClassXII',
  1006.                                         'attributes' => array(
  1007.                                             'maxlength' => 3,
  1008.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  1009.                                             'readonly' => true,
  1010.                                         ),                                      
  1011.                                         'min' => 0,
  1012.                                         'columns' => 3,
  1013.                                     ),
  1014.                                     array(
  1015.                                         'id'    => 'marks_physics_10_2',
  1016.                                         'type' => 'number',
  1017.                                         'class' => 'ClassXII inputXiiMarks',
  1018.                                         'attributes' => array (
  1019.                                                 'data-rule-checkXIIAllfieldsEmpty' => "true",
  1020.                                                 'MaxMarks' => "100",
  1021.                                                 'maxlength' => 3,
  1022.                                             ),
  1023.                                         'min' => 0,
  1024.                                         'columns' => 3,
  1025.                                     ),
  1026.                                     array(
  1027.                                         'id'    => 'marks_physics_percentage_10_2',
  1028.                                         'type' => 'text',
  1029.                                         'class' => 'ClassXII',
  1030.                                         'attributes' => array (
  1031.                                                 'data-rule-checkXIIAllfieldsEmpty' => "true",
  1032.                                                 'maxlength' => 5,
  1033.                                                 'readonly' => true,
  1034.                                                 ),
  1035.                                         'columns' => 3,
  1036.                                     ),
  1037.                                     array(
  1038.                                         'type' => 'custom_html',
  1039.                                         'name' => 'Chemistry',
  1040.                                         'columns' => 3,
  1041.                                     ),
  1042.                                     array(
  1043.                                         'id'    => 'max_marks_chemistry_10_2',
  1044.                                         'type' => 'number',
  1045.                                         'class' => 'ClassXII',
  1046.                                         'attributes' => array (
  1047.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  1048.                                             'maxlength' => 3,
  1049.                                             'readonly' => true,
  1050.                                         ),
  1051.                                         'min' => 0,
  1052.                                         'columns' => 3,
  1053.                                     ),
  1054.                                     array(
  1055.                                         'id'    => 'marks_chemistry_10_2',
  1056.                                         'type' => 'number',
  1057.                                         'class' => 'ClassXII inputXiiMarks',
  1058.                                         'attributes' => array (
  1059.                                                 'data-rule-checkXIIAllfieldsEmpty' => "true",
  1060.                                                 'MaxMarks' => "100",
  1061.                                                 'maxlength' => 3,
  1062.                                             ),
  1063.                                         'min' => 0,
  1064.                                         'columns' => 3,
  1065.                                     ),
  1066.                                     array(
  1067.                                         'id'    => 'marks_chemistry_percentage_10_2',
  1068.                                         'type' => 'text',
  1069.                                         'class' => 'ClassXII',
  1070.                                         'attributes' => array (
  1071.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  1072.                                             'maxlength' => 5,
  1073.                                             'readonly' => true,
  1074.                                             ),
  1075.                                         'columns' => 3,
  1076.                                     ),
  1077.                                     array(
  1078.                                         'type' => 'custom_html',
  1079.                                         'name' => 'Mathematics',
  1080.                                         'columns' => 3,
  1081.                                     ),
  1082.                                     array(
  1083.                                         'id'    => 'max_marks_maths_10_2',
  1084.                                         'type' => 'number',
  1085.                                         'class' => 'ClassXII',
  1086.                                         'attributes' => array (
  1087.                                                 'data-rule-checkXIIAllfieldsEmpty' => "true",
  1088.                                                 'maxlength' => 3,
  1089.                                                 'readonly' => true,
  1090.                                             ),
  1091.                                         'min' => 0,
  1092.                                         'columns' => 3,
  1093.                                     ),
  1094.                                     array(
  1095.                                         'id'    => 'marks_maths_10_2',
  1096.                                         'type' => 'number',
  1097.                                         'class' => 'ClassXII inputXiiMarks',
  1098.                                         'attributes' => array (
  1099.                                                 'data-rule-checkXIIAllfieldsEmpty' => "true",
  1100.                                                 'MaxMarks' => "100",
  1101.                                                 'maxlength' => 3,
  1102.                                             ),
  1103.                                         'min' => 0,
  1104.                                         'columns' => 3,
  1105.                                     ),
  1106.                                     array(
  1107.                                         'id'    => 'marks_maths_percentage_10_2',
  1108.                                         'type' => 'text',
  1109.                                         'class' => 'ClassXII',
  1110.                                         'attributes' => array (
  1111.                                                 'data-rule-checkXIIAllfieldsEmpty' => "true",
  1112.                                                 'maxlength' => 5,
  1113.                                                 'readonly' => true,
  1114.                                                 ),
  1115.                                         'columns' => 3,
  1116.                                     ),
  1117.                                     array(
  1118.                                         'type' => 'divider',
  1119.                                         'columns' => 12,
  1120.                                     ),
  1121.                                     array(
  1122.                                         'type' => 'custom_html',
  1123.                                         'name' => 'Physics, Chemistry & Mathematics combined Percentage: ',
  1124.                                         'desc' => 'Please fill all fields of 12th, if done or do not fill any fields.',
  1125.                                         'columns' => 9,
  1126.                                     ),
  1127.                                     array(
  1128.                                         'id'    => 'marks_total_10_2',
  1129.                                         'type' => 'text',
  1130.                                         'class' => 'ClassXII classXiiTotalPercentage',
  1131.                                         'attributes' => array (
  1132.                                             'data-rule-checkXIIAllfieldsEmpty' => "true",
  1133.                                             'maxlength' => 5,
  1134.                                             'readonly' => true,
  1135.                                             ),
  1136.                                         'columns' => 3,
  1137.                                     ),
  1138.                                     array(
  1139.                                         'type' => 'custom_html',
  1140.                                         'name' => '',
  1141.                                         'columns' => 12,
  1142.                                     ),
  1143.                                     array(
  1144.                                         'id' => 'class_xii_marksheet',
  1145.                                         'type' => 'file',
  1146.                                         'name' => __( 'Upload your 12th marksheet: ', 'tmi' ),
  1147.                                         'desc' => __( 'Your document can be in pdf format.', 'tmi' ),
  1148.                                         'max_file_uploads' => '1',
  1149.                                         'columns' => 12,
  1150.                                     ),
  1151.                                 ),
  1152.                             ),
  1153.                     ),
  1154.                 ),
  1155.                 array(
  1156.                     'id' => 'imu_cet_application_number',
  1157.                     'type' => 'text',
  1158.                     'name' => __( 'IMU CET Application Number: ', 'tmi'),
  1159.                     'attributes' =>  array(
  1160.                         'pattern' => $pattern_name_number,
  1161.                     ),
  1162.                     'required'  => false,
  1163.                     'columns' => 12,
  1164.                 ),
  1165.                 array(
  1166.                     'type' => 'divider',
  1167.                 ),
  1168.                 array(
  1169.                     'id'     => 'sports_extra_curricular',
  1170.                     'name' => __( 'Sports & Extra Curricular Activities:', 'tmi' ),
  1171.                     // Group field
  1172.                     'label_description' => 'Achievements in Sports and Extra Curricular Activities
  1173.  
  1174. (Please indicate the activities you have participated in, at what level & the awards received):',
  1175.                         'type'   => 'group',
  1176.                         'class'  => 'sports-achivement',
  1177.                         'clone'  => false,
  1178.                         'collapsible' => false,
  1179.                         'columns' => 12,
  1180.                         'fields' => array(
  1181.                                         array(
  1182.                                             'type' => 'heading',
  1183.                                             'name' => '<strong>Month / Year (MM/YYYY)</strong>',
  1184.                                             'columns' => 3,
  1185.                                         ),
  1186.                                         array(
  1187.                                             'type' => 'heading',
  1188.                                             'name' => '<strong>Sport/Activity</strong>',
  1189.                                             'columns' => 3,
  1190.                                         ),
  1191.                                         array(
  1192.                                             'type' => 'heading',
  1193.                                             'name' => '<strong>Level of participation</strong>',
  1194.                                             'columns' => 3,
  1195.                                         ),
  1196.                                         array(
  1197.                                             'type' => 'heading',
  1198.                                             'name' => '<strong>Position</strong>',
  1199.                                             'columns' => 3,
  1200.                                         ),
  1201.                                         array(
  1202.                                             'id'    => 'month_year_1',
  1203.                                             'type' => 'date',
  1204.                                             'js_options' => array(
  1205.                                                 'dateFormat' => 'mm/yy',
  1206.                                                 'changeYear' => true,
  1207.                                                 'minDate' => "-10Y",                     // 10 years less
  1208.                                                 'changeMonth' => true,
  1209.  
  1210.                                        ),
  1211.                                         'attributes' => array(
  1212.                                             'readonly'  => true,
  1213.                                             'class' => 'grpsports',
  1214.                                         ),
  1215.                                         'columns' => 3,
  1216.                                     ),
  1217.                                     array(
  1218.                                         'id'    => 'sports_activity_1',
  1219.                                         'type' => 'text',
  1220.                                         'attributes' => array (
  1221.                                             'pattern' => $pattern_name_number,
  1222.                                             'class' => 'grpsports',
  1223.                                         ),
  1224.                                         'columns' => 3,
  1225.                                     ),
  1226.                                     array(
  1227.                                         'id'    => 'participation_level_1',
  1228.                                         'type' => 'text',
  1229.                                         'attributes' =>  array(
  1230.                                             'pattern' => $pattern_name_number,
  1231.                                             'class' => 'grpsports',
  1232.                                         ),
  1233.                                         'columns' => 3,
  1234.                                     ),
  1235.                                     array(
  1236.                                         'id'    => 'position_1',
  1237.                                         'type' => 'text',
  1238.                                         'attributes' =>  array(
  1239.                                             'pattern' => $pattern_name_number,
  1240.                                             'class' => 'grpsports',
  1241.                                         ),
  1242.                                         'columns' => 3,
  1243.                                     ),
  1244.                                     array(
  1245.                                         'id'    => 'month_year_2',
  1246.                                         'type' => 'date',
  1247.                                         'js_options' => array(
  1248.                                             'dateFormat' => 'mm/yy',
  1249.                                             'changeYear' => true,
  1250.                                             'minDate' => "-10Y",                     // 10 years less
  1251.                                             'changeMonth' => true,
  1252.  
  1253.                                         ),
  1254.                                         'attributes' => array(
  1255.                                             'class' => 'grpsports',
  1256.                                             'readonly'  => true,
  1257.                                         ),
  1258.                                         'columns' => 3,
  1259.                                     ),
  1260.                                     array(
  1261.                                         'id'    => 'sports_activity_2',
  1262.                                         'type' => 'text',
  1263.                                         'attributes' => array (
  1264.                                             'pattern' => $pattern_name_number,
  1265.                                             'class' => 'grpsports',
  1266.                                         ),
  1267.                                         'columns' => 3,
  1268.                                     ),
  1269.                                     array(
  1270.                                         'id'    => 'participation_level_2',
  1271.                                         'type' => 'text',
  1272.                                         'attributes' =>  array(
  1273.                                             'pattern' => $pattern_name_number,
  1274.                                             'class' => 'grpsports',
  1275.                                         ),
  1276.                                         'columns' => 3,
  1277.                                     ),
  1278.                                     array(
  1279.                                         'id'    => 'position_2',
  1280.                                         'type' => 'text',
  1281.                                         'attributes' =>  array(
  1282.                                             'pattern' => $pattern_name_number,
  1283.                                             'class' => 'grpsports',
  1284.                                         ),
  1285.                                         'columns' => 3,
  1286.                                     ),
  1287.                                     array(
  1288.                                         'id'    => 'month_year_3',
  1289.                                         'type' => 'date',
  1290.                                         'js_options' => array(
  1291.                                             'dateFormat' => 'mm/yy',
  1292.                                             'changeYear' => true,
  1293.                                             'minDate' => "-10Y",                     // 10 years less
  1294.                                             'changeMonth' => true,
  1295.  
  1296.                                         ),
  1297.                                         'attributes' => array(
  1298.                                             'readonly'  => true,
  1299.                                             'class' => 'grpsports',
  1300.                                         ),
  1301.                                         'columns' => 3,
  1302.                                     ),
  1303.                                     array(
  1304.                                         'id'    => 'sports_activity_3',
  1305.                                         'type' => 'text',
  1306.                                         'attributes' => array (
  1307.                                             'pattern' => $pattern_name_number,
  1308.                                             'class' => 'grpsports',
  1309.                                         ),
  1310.                                         'columns' => 3,
  1311.                                     ),
  1312.                                     array(
  1313.                                         'id'    => 'participation_level_3',
  1314.                                         'type' => 'text',
  1315.                                         'attributes' =>  array(
  1316.                                             'pattern' => $pattern_name_number,
  1317.                                             'class' => 'grpsports',
  1318.                                         ),
  1319.                                         'columns' => 3,
  1320.                                     ),
  1321.                                     array(
  1322.                                         'id'    => 'position_3',
  1323.                                         'type' => 'text',
  1324.                                         'attributes' =>  array(
  1325.                                             'pattern' => $pattern_name_number,
  1326.                                             'class' => 'grpsports',
  1327.                                         ),
  1328.                                         'columns' => 3,
  1329.                                     ),
  1330.                                     array(
  1331.                                         'id'    => 'month_year_4',
  1332.                                         'type' => 'date',
  1333.                                         'js_options' => array(
  1334.                                             'dateFormat' => 'mm/yy',
  1335.                                             'changeYear' => true,
  1336.                                             'minDate' => "-10Y",                     // 10 years less
  1337.                                             'changeMonth' => true,
  1338.  
  1339.                                         ),
  1340.                                         'attributes' => array(
  1341.                                             'readonly'  => true,
  1342.                                             'class' => 'grpsports',
  1343.                                         ),
  1344.                                         'columns' => 3,
  1345.                                     ),
  1346.                                     array(
  1347.                                         'id'    => 'sports_activity_4',
  1348.                                         'type' => 'text',
  1349.                                         'attributes' => array (
  1350.                                             'pattern' => $pattern_name_number,
  1351.                                             'class' => 'grpsports',
  1352.                                         ),
  1353.                                         'columns' => 3,
  1354.                                     ),
  1355.                                     array(
  1356.                                         'id'    => 'participation_level_4',
  1357.                                         'type' => 'text',
  1358.                                         'attributes' =>  array(
  1359.                                             'pattern' => $pattern_name_number,
  1360.                                             'class' => 'grpsports',
  1361.                                         ),
  1362.                                         'columns' => 3,
  1363.                                     ),
  1364.                                     array(
  1365.                                         'id'    => 'position_4',
  1366.                                         'type' => 'text',
  1367.                                         'attributes' =>  array(
  1368.                                             'pattern' => $pattern_name_number,
  1369.                                             'class' => 'grpsports',
  1370.                                         ),
  1371.                                         'columns' => 3,
  1372.                                     ),
  1373.                                 ),
  1374.                 ),
  1375.                 array(
  1376.                     'type' => 'custom_html',
  1377.                     'name' => '',
  1378.                 ),
  1379.                 array(
  1380.                     'type' => 'divider',
  1381.                 ),
  1382.                 array(
  1383.                     'id'     => 'vocational_and_training_courses',
  1384.                     'name' => __( 'Vocational and Training Courses undertaken, if any:', 'tmi' ),
  1385.                     // Group field
  1386.                     'type'   => 'group',
  1387.                     'class'  => 'work-experience',
  1388.                     'clone'  => false,
  1389.                     'collapsible' => false,
  1390.                     'columns' => 12,
  1391.                     'fields' => array(                          
  1392.                                     array(
  1393.                                         'type' => 'heading',
  1394.                                         'name' => '<strong>Month / Year (MM/YYYY)</strong>',
  1395.                                         'columns' => 4,
  1396.                                     ),
  1397.                                     array(
  1398.                                         'type' => 'heading',
  1399.                                         'name' => '<strong>Course</strong>',
  1400.                                         'columns' => 4,
  1401.                                     ),
  1402.                                     array(
  1403.                                         'type' => 'heading',
  1404.                                         'name' => '<strong>Course duration</strong>',
  1405.                                         'columns' => 4,
  1406.                                     ),
  1407.                                     array(
  1408.                                         'id'    => 'month_year_1',
  1409.                                         'type' => 'date',
  1410.                                         'js_options' => array(
  1411.                                             'dateFormat' => 'mm/yy',
  1412.                                             'changeYear' => true,
  1413.                                             'minDate' => "-10Y",                     // 10 years less
  1414.                                             'changeMonth' => true,
  1415.  
  1416.                                         ),
  1417.                                         'attributes' => array(
  1418.                                             'readonly'  => true,
  1419.                                             'class' => 'workexperience',
  1420.                                         ),
  1421.                                         'columns' => 4,
  1422.                                     ),
  1423.                                     array(
  1424.                                         'id'    => 'course_1',
  1425.                                         'type' => 'text',
  1426.                                         'attributes' => array (
  1427.                                             'pattern' => $pattern_name_number,
  1428.                                             'class' => 'workexperience',
  1429.                                         ),
  1430.                                         'columns' => 4,
  1431.                                     ),
  1432.                                     array(
  1433.                                         'id'    => 'course_duration_1',
  1434.                                         'type' => 'text',
  1435.                                         'attributes' =>  array(
  1436.                                             'pattern' => $pattern_name_number,
  1437.                                             'class' => 'workexperience',
  1438.                                         ),
  1439.                                         'columns' => 4,
  1440.                                     ),
  1441.                                     array(
  1442.                                         'id'    => 'month_year_2',
  1443.                                         'type' => 'date',
  1444.                                         'js_options' => array(
  1445.                                             'dateFormat' => 'mm/yy',
  1446.                                             'changeYear' => true,
  1447.                                             'minDate' => "-10Y",                     // 10 years less
  1448.                                             'changeMonth' => true,
  1449.  
  1450.                                         ),
  1451.                                         'attributes' => array(
  1452.                                             'readonly'  => true,
  1453.                                             'class' => 'workexperience',
  1454.                                         ),
  1455.                                         'columns' => 4,
  1456.                                     ),
  1457.                                     array(
  1458.                                         'id'    => 'course_2',
  1459.                                         'type' => 'text',
  1460.                                         'attributes' => array (
  1461.                                             'pattern' => $pattern_name_number,
  1462.                                             'class' => 'workexperience',
  1463.                                         ),
  1464.                                         'columns' => 4,
  1465.                                     ),
  1466.                                     array(
  1467.                                         'id'    => 'course_duration_2',
  1468.                                         'type' => 'text',
  1469.                                         'attributes' =>  array(
  1470.                                             'pattern' => $pattern_name_number,
  1471.                                             'class' => 'workexperience',
  1472.                                         ),
  1473.                                         'columns' => 4,
  1474.                                     ),
  1475.                                     array(
  1476.                                         'id'    => 'month_year_3',
  1477.                                         'type' => 'date',
  1478.                                         'js_options' => array(
  1479.                                             'dateFormat' => 'mm/yy',
  1480.                                             'changeYear' => true,
  1481.                                             'minDate' => "-10Y",                     // 10 years less
  1482.                                             'changeMonth' => true,
  1483.  
  1484.                                         ),
  1485.                                         'attributes' => array(
  1486.                                             'readonly'  => true,
  1487.                                             'class' => 'workexperience',
  1488.                                         ),
  1489.                                         'columns' => 4,
  1490.                                     ),
  1491.                                     array(
  1492.                                         'id'    => 'course_3',
  1493.                                         'type' => 'text',
  1494.                                         'attributes' => array (
  1495.                                             'pattern' => $pattern_name_number,
  1496.                                             'class' => 'workexperience',
  1497.                                         ),
  1498.                                         'columns' => 4,
  1499.                                     ),
  1500.                                     array(
  1501.                                         'id'    => 'course_duration_3',
  1502.                                         'type' => 'text',
  1503.                                         'attributes' =>  array(
  1504.                                             'pattern' => $pattern_name_number,
  1505.                                             'class' => 'workexperience',
  1506.                                         ),
  1507.                                         'columns' => 4,
  1508.                                     ),
  1509.                                     array(
  1510.                                         'id'    => 'month_year_4',
  1511.                                         'type' => 'date',
  1512.                                         'js_options' => array(
  1513.                                             'dateFormat' => 'mm/yy',
  1514.                                             'changeYear' => true,
  1515.                                             'minDate' => "-10Y",                     // 10 years less
  1516.                                             'changeMonth' => true,
  1517.  
  1518.                                         ),
  1519.                                         'attributes' => array(
  1520.                                             'class' => 'workexperience',
  1521.                                             'readonly'  => true,
  1522.                                         ),
  1523.                                         'columns' => 4,
  1524.                                     ),
  1525.                                     array(
  1526.                                         'id'    => 'course_4',
  1527.                                         'type' => 'text',
  1528.                                         'attributes' => array (
  1529.                                             'pattern' => $pattern_name_number,
  1530.                                             'class' => 'workexperience',
  1531.                                         ),
  1532.                                         'columns' => 4,
  1533.                                     ),
  1534.                                     array(
  1535.                                         'id'    => 'course_duration_4',
  1536.                                         'type' => 'text',
  1537.                                         'attributes' =>  array(
  1538.                                             'class' => 'workexperience',
  1539.                                             'pattern' => $pattern_name_number,
  1540.                                         ),
  1541.                                         'columns' => 4,
  1542.                                     ),
  1543.                                 ),
  1544.                 ),
  1545.                 array(
  1546.                     'type' => 'divider',
  1547.                 ),
  1548.                 array(
  1549.                     'id' => 'application_your_wish_before_joining',
  1550.                     'type' => 'textarea',
  1551.                     'attributes' => array(
  1552.                         'pattern' => $pattern_general,
  1553.                     ),  
  1554.                     'name' => 'How do you intend spending your time after completing class XII Final exams and before joining college ?: ',
  1555.                     'required' => true,
  1556.                     'cols' => 100,
  1557.                     'columns' => 12,
  1558.                 ),
  1559.                 array(
  1560.                     'id' => 'application_degree_is_good_option',
  1561.                     'type' => 'textarea',
  1562.                     'attributes' => array(
  1563.                         'pattern' => $pattern_general,
  1564.                     ),  
  1565.                     'name' => 'Why do you think your degree in Marine Engeneering/Nautical Science is good option for you?: ',
  1566.                     'required' => true,
  1567.                     'cols' => 100,
  1568.                     'columns' => 12,
  1569.                 ),
  1570.                 array(
  1571.                     'id' => 'your_wish',
  1572.                     'type' => 'textarea',
  1573.                     'attributes' => array(
  1574.                         'pattern' => $pattern_general,
  1575.                     ),  
  1576.                     'name' => 'Why do you wish to join TMI?: ',
  1577.                     'required' => true,
  1578.                     'cols' => 50,
  1579.                     'columns' => 6,
  1580.                 ),
  1581.                 array(
  1582.                     'id' => 'what_are_your_hobbies',
  1583.                     'type' => 'text',
  1584.                     'attributes' => array(
  1585.                         'pattern' => $pattern_general,
  1586.                     ),  
  1587.                     'name' => 'What are your hobbies?: ',
  1588.                     'required' => true,
  1589.                     'size' => 50,
  1590.                     'columns' => 6,
  1591.                 ),
  1592.                 array(
  1593.                     'id' => 'what_are_your_strengths',
  1594.                     'type' => 'text',
  1595.                     'attributes' => array(
  1596.                         'pattern' => $pattern_general,
  1597.                     ),  
  1598.                     'name' => 'What are your strengths?: ',
  1599.                     'required' => true,
  1600.                     'size' => 50,
  1601.                     'columns' => 6,
  1602.                 ),
  1603.                 array(
  1604.                     'id' => 'what_are_your_weaknesses',
  1605.                     'type' => 'text',
  1606.                     'attributes' => array(
  1607.                         'pattern' => $pattern_general,
  1608.                     ),  
  1609.                     'name' => 'What are your weaknesses?: ',
  1610.                     'required' => true,
  1611.                     'size' => 50,
  1612.                     'columns' => 6,
  1613.                 ),
  1614.                 array(
  1615.                     'type' => 'divider',
  1616.                 ),
  1617.                 array(
  1618.                     'id' => 'meet_the_expenses',
  1619.                     'type' => 'checkbox_list',
  1620.                     'inline' => true,
  1621.                     'options' => array(
  1622.                         "Own Resources"=>"Own Resources",
  1623.                         "Bank Loan"=>"Bank Loan",
  1624.                         "Other"=>"Other",
  1625.                     ),
  1626.                     'name' => 'How do you intend to meet the expenses of this program?: ',
  1627.                     'desc' => '<strong>Note: Please see website for details of bank loan facilities.</strong>',
  1628.                     'required' => true,
  1629.                     'columns' => 6,
  1630.                 ),
  1631.                 array(
  1632.                     'id' => 'meet_the_expenses_other',
  1633.                     'type' => 'text',
  1634.                     'attributes' => array(
  1635.                         'pattern' => $pattern_general,
  1636.                     ),  
  1637.                     'hidden' => array( 'meet_the_expenses', '!contains', 'Other' ),
  1638.                     'name' => 'Other (specify): ',
  1639.                     'required' => false,
  1640.                     'size' => 50,
  1641.                     'columns' => 6,
  1642.                 ),
  1643.                 array(
  1644.                     'type' => 'custom_html',
  1645.                     'name' => 'You are required to submit the letter as per <a href="http://www.tmi.tolani.edu/wp-content/uploads/2018/05/Format-for-Letter-reg-course-approval.pdf" target="_blank">attached format (Annex 1)</a>. It is to be printed on college/institute letterhead and to be submitted along with your application form<strong>Declaration</strong>',
  1646.                 ),
  1647.                 array(
  1648.                     'id' => 'application_declaration',
  1649.                     'type' => 'radio',
  1650.                     'required' => true,
  1651.                     'options' => array(
  1652.                     '1' => __("  We hereby declare that all the statements made above are true and correct.")),
  1653.                     'attributes' => array(
  1654.                         'required' =>   true,
  1655.                         'class' => 'inline',
  1656.                     ),
  1657.                     'collapse' => false,
  1658.  
  1659.                 ),
  1660.        ),
  1661. );
  1662.  
  1663. if (is_admin()) {
  1664.     $meta_boxes[0]['fields'] = array_merge($meta_boxes[0]['fields'],$admin_fields);
  1665. }
  1666.  
  1667. return $meta_boxes;
  1668.  
  1669. }
  1670. add_filter( 'rwmb_meta_boxes', 'tmi_application_get_meta_box' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement