I'm not sure where I put this:
<?php
if(!empty($form->data["field_name"])):
echo $form->data["field_name"];
endif;
?>
Does it go in the content box of the TCPDF action where the field is, or does it go in a custom code event before that?
As for the Arrays - I have the handle array action added and the chekcbox fields output properly when at least one of the boxes is checked. It's just when they don't choose anything and it's empty that I get the {field_name} instead of just blank space. It works fine for any other kind of field type (text, dropdown, etc..) - if it's left blank on the form, it's blank on the output.
This is what's currently in the TCPDF box:
<table>
<tr>
<td colspan="2">Patient Name: {patient}</td>
<td>Date of Birth: {dob}</td>
<td colspan="2">Email: {email}</td>
</tr>
<tr><td height="28" colspan="5"> </td></tr>
<tr><td width="37">{generalhealth}</td><td colspan="4">Is your general health good?</td></tr>
<tr><td> </td>
<td colspan="4">If NO please explain: {ghifno}</td>
</tr>
<tr>
<td> </td>
<td colspan="4"> </td>
</tr>
<tr><td>{healthchanged}</td><td colspan="4">has there been a change in your health within the last year?</td></tr>
<tr><td> </td>
<td colspan="4">if YES, explain: {healthchangeexplain}</td>
</tr>
<tr>
<td> </td>
<td colspan="4"> </td>
</tr>
<tr><td>{ervisit}</td><td colspan="4">Have you gone to the hospital or emergency room or had a serious illness in the alst three years?</td></tr>
<tr><td> </td>
<td colspan="4"> If YES, explain: {erexplain}</td>
</tr>
<tr>
<td> </td>
<td colspan="4"> </td>
</tr>
<tr><td>{drcare}</td><td colspan="4">Are you being treated by a physician now?</td></tr>
<tr><td> </td>
<td colspan="4"> If YES, explain: {drcarereason}</td>
</tr>
<tr><td> </td>
<td> Date of last medical exam: {medexam}</td>
<td colspan="6">Reason for exam: {mdexamwhy}</td>
</tr>
<tr>
<td> </td>
<td colspan="4"> </td>
</tr>
<tr><td>{problemsdental}</td><td colspan="4">have you had problems with prior dental treatment?</td></tr>
<tr><td> </td>
<td colspan="4">If YES, explain: {dproblems}</td>
</tr>
<tr><td> </td>
<td>Date of last dental exam: {dentalexam}</td>
<td colspan="6">Reason for exam: {dentalexamwhy}</td>
</tr>
<tr>
<td> </td>
<td colspan="4"> </td>
</tr>
<tr>
<td>{inpain}</td><td colspan="4">Are you in pain now?</td>></tr>
<tr><td> </td>
<td colspan="4">If YES, explain: {painyes}</td>
</tr>
<tr>
<td height="21" colspan="5" valign="bottom"> </td>
</tr>
<tr>
<td height="26" colspan="5" valign="bottom" bgcolor="#CCCCCC"><strong>II. I have experienced the following:</strong></td>
</tr>
<tr><td colspan="5">{exp1group}</td></tr>
<tr>
<td height="21" colspan="5" valign="bottom"> </td>
</tr>
<tr><td height="21" colspan="5" valign="bottom" bgcolor="#CCCCCC"><strong>I have had, or I have the following: </strong></td></tr>
<tr><td colspan="5">{exp3group}</td></tr>
<tr>
<td height="21" colspan="5" valign="bottom"> </td>
</tr>
<tr><td height="21" colspan="5" valign="bottom" bgcolor="#CCCCCC"><strong>I am allergic or have had a reaction to:</strong></td></tr>
<tr><td colspan="5">{allergic}</td></tr>
<tr>
<td colspan="5">Other Alelrgies: {othallergic}</td>
</tr>
<tr>
<td height="21" colspan="5" valign="bottom"> </td>
</tr>
<tr><td height="21" colspan="5" valign="bottom" bgcolor="#CCCCCC"><strong>I am taking, or have taken within the last 3 months:</strong></td></tr>
<tr><td colspan="5">{taking}</td></tr>
<tr>
<td colspan="5">Please list: {takenlist}</td>
</tr>
<tr>
<td height="21" colspan="5" valign="bottom"> </td>
</tr>
<tr><td height="21" colspan="5" valign="bottom" bgcolor="#CCCCCC"><strong>Women Only:</strong></td></tr>
<tr><td>{pregnant}</td><td colspan="4">Are you or could you be pregnant?</td></tr>
<tr><td> </td>
<td colspan="4">If YES, what month?: {pregmonth}</td>
</tr>
<tr><td>{nursing}</td><td colspan="4">Are you nursing?</td></tr>
<tr><td>{birthcontrol}</td><td colspan="4">Are you taking birth control pills?</td></tr>
<tr>
<td height="21" colspan="5" valign="bottom"> </td>
</tr>
<tr><td height="21" colspan="5" valign="bottom" bgcolor="#CCCCCC"><strong>All Patients</strong></td></tr>
<tr><td>{otherdisease}</td><td colspan="4">Do you have or have you had any other diseases or medical problems NOT listed on this form?</td></tr>
<tr><td> </td>
<td colspan="4">If YES, please explain; {othdiseasetxtyes}</td>
</tr>
<tr><td>{premeddental}</td><td colspan="4">have you ever been pre-medicated for dental treatment?</td></tr>
<tr><td> </td>
<td colspan="4">If YES, why: {premedyestxt}</td>
</tr>
<tr><td>{fenphen}</td><td colspan="4">Have you ever taken Fen-Phen?</td></tr>
<tr><td> </td>
<td colspan="4">If YES, when: {fenyestxt}</td>
</tr>
<tr><td height="27">{privatetalk}</td><td colspan="4">Is there any issue or condition that you would like to discuss with the dentist in private?</td></tr>
<tr>
<td height="21" colspan="5"> </td>
</tr>
<tr>
<td height="59" colspan="5"><em>The practice of dentistry involves treating the whole person. If the dentist determines that there may be a potentially medically compromised situation, medical consultation may be needed prior to commencement of dental treatment.<br/>
I authorize Dr. Rashidi to contact my physician</em></td></tr>
<tr>
<td colspan="3">Signature of Patient: {certsigpatient}</td>
<td colspan="2">Date: {certsigpatientdate}</td>
</tr>
<tr>
<td colspan="3">Physician's Name: {mdktsigname}</td>
<td colspan="2">Phone Number: {mdktsigmdtel}</td>
</tr>
<tr>
<td height="24" colspan="5"> </td>
</tr>
<tr><td height="46" colspan="5"><strong>I certify that I have read and understand this form. To the best of my knowledge, I have answered every question completely and accurately. I will inform my orthodontist of any change in my health and/or medication. Further I will not hold my orthodontist, or any other member of his staff, responsible for any errors or omissions that I may have made in the completion of this form.</strong></td></tr>
<tr>
<td colspan="3">Signature of Patient: {certsigpatient}</td>><td colspan="2">Date: {certsigpatientdate}</td>
</tr>
</table>