Page 1 of 1

conditions on 2 fields

Posted: Sun Sep 10, 2023 6:14 pm
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

Re: conditions on 2 fields

Posted: Sun Sep 10, 2023 7:41 pm
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

Re: conditions on 2 fields

Posted: Sun Sep 10, 2023 8:53 pm
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 !

Re: conditions on 2 fields

Posted: Mon Sep 11, 2023 6:04 am
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.

Re: conditions on 2 fields

Posted: Mon Sep 11, 2023 1:26 pm
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 !