Events Made Easy › Forums › How do I … › … dynamically add more names for multi-seat forms
Tagged: covid19, dynamic fields, multi-seat
- This topic has 4 replies, 2 voices, and was last updated 3 years, 5 months ago by Anonymous.
-
AuthorPosts
-
Thu 3 Jun 2021 at 18:13 #62647AnonymousInactive
What is the best way to dynamically add additional name fields to the form?
In my example, someone can select multiple seats (also in different categories), but because of COVID19, personal data must be registered for each seat. In my case it is even sufficient if I implement this for one family each, so only different first names have to be registered additionally.
I tried to dynamically add templates, but the additional fields are not displayed as input fields, but the placeholders are output in plain text.Can anyone give me a hint on how to best implement this situation in “Events Made Easy”?
Many thanks in advance!
Thu 3 Jun 2021 at 23:51 #62649FrankyKeymasterI use something like this as a template:
<hr><table> <tr><td>Naam:</td><td>#_FIELD{name child}</td></tr> <tr><td>info2:</td><td>#_FIELD{birthdate child}</td></tr> </table>
and in the dynamic conditions I set as condition “#_SEATS” “greater than” “1” and “repeat”.
In your form you then need #_DYNAMICDATA to decide where the template is rendered and that should do it.Fri 4 Jun 2021 at 11:55 #62652AnonymousInactiveaah, that helped me getting further, Thanks!
Only problem left is the combined count of three different seat categories to get the right amount of additional name fields. I found an older post discussing this problem, but it doesn’t seem to help me.
I now am using #_SEATS{1}…#_SEATS{3} for three categories and the only thing working in the dynamic field condition is using one specific seat category. I tried #_SEATS, #_SEATS{}, #_SEATS{1,2,3}, #_PLACES{1}… but none of them is giving me any output at all.
If there is any post describing a solution that would be enough for me.
Thank you very much in advance!Fri 4 Jun 2021 at 12:08 #62653FrankyKeymasterThat is not possible, but just use multiple conditions: the first where you use #_SEATS{1} to check (and show a template), the second condition for #_SEATS{2} (and show maybe the same template) etc …
Edit: small thing: if you check the option “Dynamic data check on every field”, maybe your #_SEATS will work (I’d need to check the code, but easy enough for you to test 🙂 )
Fri 4 Jun 2021 at 12:28 #62654AnonymousInactivewow thank you.
“dynamic data check” won’t work, but multiple conditions work fine. Therefore I set the first mandatory category to condition #_SEATS{1}>1, all other seats >0Thank you so much for the quick help, I really appreciate it.
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.