Hi
I have multi page form - the last page is a confirmation page (page 4 of the form) where I print the data entered / selected on previous pages.
I have one text field conditional on the dropdown value. The dropdown is called "packs_required" with the following values:
1 Pack (Free P&P)=1 Pack (Free P&P)
Multiple Packs=Multiple Packs
When "Multiple Packs" is selected the text field is shown called "no_of_multiple_packs". This is all working.
Now on the confirmation page I'd like to print the data in an HTML section e.g.
<table>
<tr><td><strong>Packs Required: </strong></td><td>{data:packs_required}</td></tr>
<tr><td><strong>No of Multiple Packs: </strong></td><td>{data:no_of_multiple_packs}</td></tr>
</table>
This prints the data fine but I'd like to print the value of "no_of_multiple_packs" if the value of "packs_required" is only "Multiple Packs".
So I need a condition in an HTML section...Can I add one?
So far I have tried:
I have multi page form - the last page is a confirmation page (page 4 of the form) where I print the data entered / selected on previous pages.
I have one text field conditional on the dropdown value. The dropdown is called "packs_required" with the following values:
1 Pack (Free P&P)=1 Pack (Free P&P)
Multiple Packs=Multiple Packs
When "Multiple Packs" is selected the text field is shown called "no_of_multiple_packs". This is all working.
Now on the confirmation page I'd like to print the data in an HTML section e.g.
<table>
<tr><td><strong>Packs Required: </strong></td><td>{data:packs_required}</td></tr>
<tr><td><strong>No of Multiple Packs: </strong></td><td>{data:no_of_multiple_packs}</td></tr>
</table>
This prints the data fine but I'd like to print the value of "no_of_multiple_packs" if the value of "packs_required" is only "Multiple Packs".
So I need a condition in an HTML section...Can I add one?
So far I have tried:
<table>But the code above does not work for some reason...
<tr><td><strong>Packs Required: </strong></td><td>{data:packs_required}</td></tr>
<?php
if ( $form->data['if packs_required'] == 'Multiple Packs' ) {
echo "<tr><td><strong>No of Multiple Packs: </strong></td><td>{data:no_of_multiple_packs}</td></tr>";}
?>
</table>