conditions on 2 fields

Issues related to forms.
Post Reply
syncopic
 
 
Posts: 61
Joined: Mon Jul 24, 2017 1:37 pm

conditions on 2 fields

Post by syncopic »

Hello Pablo,

I have a form in which you can choose in two fields ('erwachsene' and 'ermäßigt') an amount of 'tickets' to order.
To avoid blank fields i added a 'must choose' condition to both fields with exclusion of list entry 1 ('Bitte auswählen'). This works.

But people must be allowed to choose only tickets from one field, so i added 'keine Karten' (value 'keine') as the second list point to each list.
Now i have the problem, that people can choose 'keine Karten' on both fields at the same time - which make no sense.

I tried to add a condition (not equal to), but it doesn´t work. I´ve made a reduced ZIP-file of the project for research:
https://www.pro-e-fact.de/preview/SOB2020.zip

Maybe you can have a look, what i´m doing wrong :wink:
Thank you for your support !

syncopic
User avatar
Pablo
 
Posts: 23331
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: conditions on 2 fields

Post by Pablo »

I cannot open your project because it uses one of more extensions which I do not have.
Can you please remove all content that is not relevant to your question?

For further details about how to share a project file, please see this FAQ:
viewtopic.php?f=10&t=82134
syncopic
 
 
Posts: 61
Joined: Mon Jul 24, 2017 1:37 pm

Re: conditions on 2 fields

Post by syncopic »

Hello Pablo,

sorry - i forgot to remove the 'TopScroll'-Plugin.
Now it´s deleted. No any other plugins included.

The link to the ZIP-file is the same as before.

Thank you !
User avatar
Pablo
 
Posts: 23331
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: conditions on 2 fields

Post by Pablo »

Maybe you can try this?
- Add an extra (read only) field to the form: 'sum'
- Calculate the sum of the 'erwachsene' and 'ermäßigt' fields in this field (via conditions).
- Add validation to the 'sum' field to make sure it's not zero.
- For this to work, you will have to change the value of the selections to numbers (instead of 1x, 2x), where the first item is zero.

Note that version 15 is no longer supported.
syncopic
 
 
Posts: 61
Joined: Mon Jul 24, 2017 1:37 pm

Re: conditions on 2 fields

Post by syncopic »

Thank you for your support !

I´m working with WWB17 actually, but this site is made with 15 and until now not took over to 17 (for time reasons).
I will try your suggestion :)

Thanks again !
Post Reply