Ok, here is my "Setup".
Onload
Load CSS
HTML (Render Form)
[b]On Submit[b]
Custom Code - Action Field=DVOP-Eligibility
<?php
$qualified = 'Ineligible';
/*Question 2a*/
/*Step 1: 2a must be "Yes". If so, proceed to step 2*/
if ( $form->data['DVOP2a'] == 'Yes' ) {
/*Step 2: 2c MUST also be "Yes". If so, proceed to step 3*/
if ( $form->data['DVOP2c'] == 'Yes' ) {
/*Step 3: At least one of 2d, 2e, or 2f must also be "Yes". If so, proceed to step 4*/
if ( $form->data['DVOP2d'] == 'Yes' || $form->data['DVOP2e'] == 'Yes' || $form->data['DVOP2f'] == 'Yes' ) {
/*Step 4: At least one of 4a, 4b, 4c, 4d, 4e, 4f, 4g or 4h must be "Yes". If so, the applicant is to be referred to a DVOP Specialist*/
if ( $form->data['DVOP4a'] == 'Yes' || $form->data['DVOP4b'] == 'Yes' || $form->data['DVOP4c'] == 'Yes' || $form->data['DVOP4d'] == 'Yes' || $form->data['DVOP4e'] == 'Yes' || $form->data['DVOP4f'] == 'Yes' || $form->data['DVOP4g'] == 'Yes' || $form->data['DVOP4h'] == 'Yes' ) {
/*IF eligibility is MET*/
$qualified = 'Eligible;
/*Question 2b*/
/*Step 1: 2b must be "Yes". If so, proceed to step 2*/
} elseif ( $form->data['DVOP2b'] == 'Yes' ) {
/*Step 2: Either 2d or 2e must also be "Yes". If so, proceed to step 3 */
if ( $form->data['DVOP2d'] == 'Yes' || $form->data['DVOP2e'] == 'Yes' ) {
/*Step 3: Either 4h, 4i, 4j or 4k must be "Yes". If so, the applicant is to be referred to a DVOP Specialist.*/
if ( $form->data['DVOP4h'] == 'Yes' || $form->data['DVOP4i'] == 'Yes' || $form->data['DVOP4i'] == 'Yes' || $form->data['DVOP4j'] == 'Yes' || $form->data['DVOP4k'] == 'Yes' ) {
/*IF eligibility is MET*/
$qualified = 'Eligible';
/*Question 3a or 3b*/
/*If either question 3a or 3b is "Yes", the appicant is to be referred to a DVOP Specialist.*/
} elseif ( $form->data['DVOP3a'] == 'Yes' || $form->data['DVOP3a'] == 'Yes' ) {
/*IF eligibility is MET*/
$qualified = 'Eligible';
}
$form->data['qualified'] = $qualified;
?>
TCPDF - Works as expected (Does not include {qualified}
Email
It is at this point where I am initially trying to introduce the {qualified} parameter, and it is not included... I am pretty sure there is something wrong where elseif on line 16 comes into play in the php code... Can you check it out and let me know please?
Good Day,
{ApplicantName} has submitted an application for DVOP Services.
{qualified}
Thank You.