Best way to make a related form optional

I have a site with a members table and a related boats table. Members come in two categories: 1)those with boats, and 2) social members who have no boats. I would like to offer a single application page that displays the member form and, if applying for boating membership, also displays the boat form.

I don't see any way of showing/hiding the related boat form based on a condition. Ideally, I'd like it to show if an applicant selects "boating member" on the members___membership_type field.

Is there a best way to show/hide the boating form and ensure that, when an application selects "social" as membership_type, I'm not creating a blank boats record without just creating separate forms for each applicant type? THANKS!
 
If your user don't fill elements in joined boats form, no record will be created in database.
Notes:
1. joined group need to be repeatable;
2. Repeat min group parameter need to be 0;
When need to add boats data then show joined group and simulate click to addgroup button.
If the user change to value that don't need boats data, then simulate click to deletegroup button and hide boats form.
The boats form may be set hide by default with css then show/hide with js after user select.
 
Last edited:
Thanks @startpoint. To do as you suggest, I'd need to eliminate the boats table, and merge the boats data into the members table as a repeatable group. Perhaps that's the data structure I should have used all along, but it seems like a big shift now. I think instead, I will make a second version of the list without the join and direct users to complete one or the other application.
 
...To do as you suggest, I'd need to eliminate the boats table, and merge the boats data into the members table as a repeatable group..
No, you can join a list and set the join to be repeatable.
I think you have this already, you only have to set the min repeat in the boats repeat group to 0.

Gesendet von meinem SM-G930F mit Tapatalk
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top