My form works fine.... I have checkboxes with the following values (any or all can be checked):
GENERAL CLEAN=GENERAL CLEAN
REPAIR=REPAIR
OTHER=OTHER
On my PDF form I have these three options. I am trying to figure out how to output that with either YES or NO... thoughts in the action is an if statement where if "GENERAL CLEAN" is selected the variable would be YES, otherwise NO.
It's the if statement I am struggling with.
GENERAL CLEAN=GENERAL CLEAN
REPAIR=REPAIR
OTHER=OTHER
On my PDF form I have these three options. I am trying to figure out how to output that with either YES or NO... thoughts in the action is an if statement where if "GENERAL CLEAN" is selected the variable would be YES, otherwise NO.
It's the if statement I am struggling with.
Ok, I figured it out.... in the ACTIONS section add PHP. This is my PHP code:
$newstring = $this->data("services_to_be_performed");Then for each one I check on the PDF, add {var:php10} variable for example.
$yes = "YES";
$no = "NO";
if (in_array("OTHER", $newstring))
{
return $yes;
}
else
{
return $no;
}
You need to login to be able to post a reply.