Forums

Multi page form - issues with printing multiple checkbox values

tomaszciti 21 Feb, 2020
Hi

I have a multi page form with 4 pages - the last one is confirmation page used to print data entered / selected on page 1-3.
Page 3 contains the following checkbox:



On the confirmation page (page 4) I put the following to print the selected checkbox values:
<tr><td><strong>Member of trade associations: </strong></td><td>{data.join[, ]:select_trade_associations}</td></tr>
This generally seems to work but I also have "Back" buttons on all pages.

1) When new session starts and you get to page 4 with confirmation the selected values are printed correctly e.g. 'ACS' checked prints:

Member of trade associations: ACS

2) When you press back and change the checkbox values it seems to work fine:

Member of trade associations: ACS, NFRN, SGF, RetailNI, Other/None

3) When you use the Back button again the problems start e.g. when only 'ACS' and 'Other/None' are checked I get the following values printed:

Member of trade associations: ACS, Other/None, SGF, RetailNI, Other/None

4) Now when I press Back and select only 'Other/None' I get the following print-out on the next page (confirmation):

Member of trade associations: Other/None, Other/None, SGF, RetailNI, Other/None


Something is obviously not right - the printed values are incorrect e.g. 'Other/None' is printed multiple times instead of just one in case no 4 and in case no 3 'ACS, Other/None' should be printed but I get 'ACS, Other/None, SGF, RetailNI, Other/None'.

How do I solve this?
tomaszciti 21 Feb, 2020
I think this happens because more sessions are added when the "Back" buttons are used and the field array gets messed up.
So far I have added to the first page:



But this doesn't solve the issues as I still get incorrect values when Back buttons are used.
healyhatman 21 Feb, 2020
There's a Form Area you can use in the views.
This topic is locked and no more replies can be posted.