I have a radio buttons (3 options) where user can select and a table for the option will display automatically and fills out. In the PDF attachment, I would like to only print what the user selected and filled out. This is what I came up with (obviously not printing)
{% for option in data.choose_your_shipping_option %} {% if option == "Normal" %} <table> <tr> <th>Shipping Address:</th> <th>Acct #</th> </tr> <tr> <td rowspan="3">[webform_submission:values:shipping_address]</td> <td>[webform_submission:values:id_num]</td> </tr> <tr> <th>Phone</th> </tr> <tr> <td> [webform_submission:values:phone] </td> </tr> </table> {% elseif option == "Time Sensitive" %} <table> <tr> <th>Delivery Date</th> <td>[webform_submission:values:time_sensitive_01_delivery_date]</td> <th>Must Have Street Address (No PO Box)</th> </tr> <tr> <th colspan="2">Shipping Address:</th> <th>Acct #</th> </tr> <tr> <td colspan="2" rowspan="4">[webform_submission:values:shipping_address_2]</td> <td>[webform_submission:values:id_num]</td> </tr> <tr> <th>Phone</th> </tr> <tr> <td> [webform_submission:values:phone_2] </td> </tr> </table> {% elseif option == "Hold For Pick-up" %} <table> <tr> <th>Will be picked up by</th> <th>Pick-up Date:</th> </tr> <tr> <td>[webform_submission:values:pick_up_01_picked_up_by]</td> <td>[webform_submission:values:pick_up_01_pick_up_date]</td> </tr> <tr> <th>Pick-up Location</th> <th>Pick-up Time</th> </tr> <tr> <td>[webform_submission:values:location]</td> <td>[webform_submission:values:time]</td> </tr> </table> {% endif %} {% endfor %}
How would I print the table that’s filled out by the user?