Validation on subscription form for event

Stijn created the topic: Validation on subscription form for event

I would like to create a subscription form for an event.

There would have to be some sort of check or validation for 2 questions:

1. Number
--> If it starts with '05' or '91' an error message should be shown telling people they can't use this number for their subscription

2. Counting total attendees for this subscription
People can subscribe and bring with them a maximum of 5 people. No problem there, since I can set allowed values between 1 and 6.
However, I would need additional information with regards to the ages of the people they bring.

So it would seem best to just ask them how many people of each age range they would bring.

I.e.
- Number of adults: values range from 1 to 6
- Number of children between 11 and 18: values range from 0 to 5, but total can not exceed 6 for all these options
- Number of children between 6 and 10: values range from 0 to 5, but total can not exceed 6 for all these options
- Number of children between 3 and 5: values range from 0 to 5, but total can not exceed 6 for all these options
- Number of children between ages 0 and 2: values range from 0 to 5, but total can not exceed 6 for all these options

The total should not exceed 6. So if they come and bring 3 children aged 11 and 2 children aged 4, that's okay. But if they fill in one more child between 0 and 2, an error message should be displayed.

Is there a way to accomplish this?

#91403

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hi, Stijn!

Thank you for posting your questions!

1. Regarding the number field, if you have WordPress Form Maker, you can achieve this using a Single Line Text with Regular Expression. The RegEx pattern can be configured from Advanced Options of Single Line Text field.

2. Unfortunately, this setup is not possible to accomplish with Form Maker. But there is a better solution which you can use instead. Please set the field where users specify the number, then set 6 fields (or fieldsets) for the additional information.

Afterwards, navigate to Form Options > Conditional Fields of your form and configure conditions based on the following logic. If users write 2, only two of the additional info fields will appear. In case they write 3, the 3 of them will appear, and so on.

Hope this workaround is a good solution for you.
Thanks! Have a wonderful day!


Kind regards,
Agapi G.
Web-Dorado team
#91421

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi

Thanks for your reply!

As for the second solution, I think it won't be possible because I can't know which fields people will need.

For example, if someone would bring 2 baby's and 1 other adult, they fill in 4 in the first field.
Then I need them to be able to tell me how many people for each age-range they would bring.

But there are 5 categories:
- 0-2
- 3-5
- 6-10
- 11-18
- adults

So in the above scenario, they would have to be able to fill in the following:
- 0-2: 2
- 3-5
- 6-10
- 11-18
- adults: 2

Total = 4

But when they fill in 4, I can't know which age ranges I have to present to them...

#91443

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hey, Stijn!

In that case, perhaps your solution of 4 fields is the most optimal way.

Could you please create your form and post its link? We will provide a custom Javascript code, which will return an error in case users write numbers that add up to a larger number than 4.

Thanks! Have a wonderful day!


Kind regards,
Agapi G.
Web-Dorado team
#91457

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi

Thanks a lot! This is the temorary form: www.4uz11.be/wpforms-preview/

Regards
Stijn

#91473

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi

Thanks a lot! This is the temporary form: www.4uz11.be/wpforms-preview/

Regards
Stijn

#91475

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hi, Stijn!

Thank you for the link!
Unfortunately, the page returns a 404 Page Not Found error. We get the following message when trying to access the page:

Geen Resultaten Gevonden
De pagina die u zocht kon niet gevonden worden. Probeer uw zoekopdracht te verfijnen of gebruik de bovenstaande navigatie om deze post te vinden.


Could you please check this?
Thanks! Have a wonderful day!


Kind regards,
Agapi G.
Web-Dorado team
#91511

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi, should be public now, sorry :)

#91517

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hey, Stijn!

We tried to get the sum of the field values, but it returns NaN (not a number) for some reason. Could we make the changes from the admin area of your website? Please send the login information using the contact form on this page. Our developers will check the issue as soon as possible and figure out a solution.

Make sure to mention the link to this forum thread in your message.
Thanks! Have a great day!


Kind regards,
Agapi G.
Web-Dorado team
#91581

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi

I provided the login credentials in this support topic regarding a technical issue.
#277961

Can you access them there?

Regards
Stijn

#91583

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hey, Stijn!

Of course, we can, I have asked our development team to make the changes already.
We will let you know as soon as they finish working on your website.

Cheers!


Kind regards,
Agapi G.
Web-Dorado team
#91627

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hey, Stijn!

We have added the custom Javascript, but we need an alert message to show the users. Could you please post the message that should be added to the alert?
Thanks!


Kind regards,
Agapi G.
Web-Dorado team
#91739

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi

Could you show this message?

Voor KIDS ON STAGE op zondag 17 december kun je maximaal 6 personen in totaal inschrijven. Jij duidde er meer aan dan toegelaten.
Telt jouw gezin meer dan 6 leden, neem dan contact op met het 4UZ11-team om je verder te helpen. Dat kan via mail [email protected] of tel. 41461 / 016 34 14 61.

#91741

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hey, Stijn!

Thank you for providing the message!

Our developers have added it, could you please check the functionality of the customization? Please let me know in case you notice something odd.
Cheers!


Kind regards,
Agapi G.
Web-Dorado team
#91801

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi

I get the error message, but to logic doesn't seem right.

There should be 5 fields (Volwassenen, 0-2, 3-5, 6-10 and 11-14).

The first one should have a value ranging from 1 to 6
The other fields should be set to 0, and can't be more than 5
If to sum of any of these 5 fields is more than 6, the error message should show up

It seems that in the current version, the field 'Volwassenen' is used to show the error message if the sum of the fields below is more than the value selected in the first field Volwassenen.

That's fine too, but then it should be changed as follows:

First field: rename to 'Aantal personen' (possible values: 1 to 6)
5 fields with following values and never higher than the number entered in the first field:

0-2: 0 to 5
3-5: 0 to 5
6-10: 0 to 5
11-14: 0 to 5
Ouder dan 14: 1 to 6

Is it possible to adjust the form in one of these ways, whichever is the most convenient for you?

Regards
Stijn

#91821

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hi, Stijn!

Thank you for checking!
I have asked our development team to make the changes. They will finish soon and I will notify you right after.

Cheers!


Kind regards,
Agapi G.
Web-Dorado team
#91855

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hi, Stijn!

Our development team has made the requested changes on your website.
Could you please have a look?

Cheers!


Kind regards,
Agapi G.
Web-Dorado team
#91869

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi

Looks good!

Just one last thing: the field 'Volwassenen' should be renamed to 'Met hoeveel personen kom je naar het feest op zondag'
I tried changing it myself, but then the calculation stops working.

I also added one extra age option 'Ouder dan 14 (inclusief jezelf dus)' that should be taken into account for the calculation.
Value is between 1 and 6 for this one, because the person subscribing is always older than 14 years.

Could your team make these last changes? Then it's perfect :)

Thanks for all the help!

#91879

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hi, Stijn!

Could you please make all the changes regarding the label text and the fields and let me know? Our development team will apply the calculations afterwards.
Cheers!


Kind regards,
Agapi G.
Web-Dorado team
#91889

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Done :)

#91893

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Validation on subscription form for event

Hey, Stijn!

I went to check the fields and assign a task to our developers, but found that the calculation fields were deleted. Please have a look at this short video. Could you please check that?

Thanks!


Kind regards,
Agapi G.
Web-Dorado team
#91907

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi

If you check the last checkbox 'Feest op zondag 17 december 2017', the calculated fields will appear.

That's because they should only show up when people choose that day :)

#91949

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

Hi Agapi

Could this be fixed before tommorrow?

Regards
Stijn

#92023

Please Log in or Create an account to join the conversation.


Stijn replied the topic: Validation on subscription form for event

I see it works now, so thank you.
Regards
Stijn

#92053

Please Log in or Create an account to join the conversation.


Anoush replied the topic: Validation on subscription form for event

Dear Stijn,

You're welcome! Let us know if you need anything else. Have a nice day!

#92077

Please Log in or Create an account to join the conversation.


Time to create page: 0.349 seconds
Powered by Kunena Forum

WORLD-CLASS SUPPORT

We are here for you every step of the way. Turn to our support with any questions you might have about our products and services. Our experienced customer care team is available to help you as fast as we possibly can.

Contact us