Hello everyone,
I’m encountering an issue with the implementation of ConfiForms rules in my form, and I hope someone can help me.
Goal:
I have a form where the number of participants (anzahl
) must be specified. Based on the number of participants, I want to filter a dropdown field (ort
):
If there are 20 or more participants, only certain options should be shown in the dropdown (e.g., „Trainingsplatz 1“, „Trainingsplatz 2“, and „Trainingsplatz 1 & 2“ should be hidden).
If the number of participants is less than 20, all options in the dropdown (ort
) should be visible again.
What works:
The first rule works as expected:
When the number of participants is 20 or more, only the desired options are shown, e.g., ort:1 OR ort:5 OR ort:6 OR ort:7
.
The problem:
However, the rule that should display all options when the number of participants is below 20 is not working as expected.
confiform-field-definition-rules"
"applyFilterOnField">true</ac:parameter>
"condition">anzahl:[<20]</ac:parameter>
"fieldName">ort</ac:parameter>
"filteredFieldValues">!2,!3,!4</ac:parameter>
"values">ort:*</ac:parameter>
"action">Apply Filter on a field</ac:parameter>
"actionFieldName">anzahl</ac:parameter>
What happens is:
When the number of participants is below 20, the options remain hidden, and I cannot see all available options in the dropdown.
Questions:
Am I missing something when defining the reverse rule?
Is there a correct way to ensure all options in the dropdown are shown when the participant number drops below 20?
Is there anything else I need to consider to make sure all options appear when the participant count is under 20?
I’d appreciate any help or advice on how to resolve this issue.
Thanks in advance!
Just put the * into the filter to apply field
So all the options will be shown when this condition is met (this rule is triggered)
Alex
sorry for posting my answer twice. Now in the right reply section ;D
It not works!
Here my code: What ist wrong here why the second rule don't work
<p>
<ac:structured-macro ac:macro-id="654121d8-34b0-4da2-8615-ddca936a7a9b" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">anzahl</ac:parameter>
<ac:parameter ac:name="fieldLabel">Anzahl der Teilnehmer</ac:parameter>
<ac:parameter ac:name="type">number</ac:parameter>
<ac:parameter ac:name="separator">false</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="b612a2aa-e7b8-42e0-8965-a18b9a8635c1" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ort</ac:parameter>
<ac:parameter ac:name="fieldLabel">Veranstaltungsort</ac:parameter>
<ac:parameter ac:name="values">false[1=Fanmeile|2=Trainingsplatz 1|3=Trainingsplatz 2|4=Trainingsplatz 1&2|5=Arena 1|6=Arena 2|7=Arena 1&2|]</ac:parameter>
<ac:parameter ac:name="type">select</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="4e975807-7dae-4191-a319-db576a3b88f4" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">anzahl:[>=20]</ac:parameter>
<ac:parameter ac:name="fieldName">ort</ac:parameter>
<ac:parameter ac:name="values">ort:1 OR ort:5 OR ort:6 OR ort:7</ac:parameter>
<ac:parameter ac:name="action">Apply Filter on a field</ac:parameter>
<ac:parameter ac:name="actionFieldName">anzahl</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="f8e755cb-6458-4ae1-be23-b7b9e5051f04" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">anzahl:[<20]</ac:parameter>
<ac:parameter ac:name="fieldName">ort</ac:parameter>
<ac:parameter ac:name="values">*</ac:parameter>
<ac:parameter ac:name="action">Apply Filter on a field</ac:parameter>
<ac:parameter ac:name="actionFieldName">anzahl</ac:parameter>
</ac:structured-macro>
</p>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Remove [] around your values in filters
anzahl:[<20]
should be
anzahl:<20
Same for the other rule's condition
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It not works!
Here my code: What ist wrong here why the second rule don't work
<p>
<ac:structured-macro ac:macro-id="654121d8-34b0-4da2-8615-ddca936a7a9b" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">anzahl</ac:parameter>
<ac:parameter ac:name="fieldLabel">Anzahl der Teilnehmer</ac:parameter>
<ac:parameter ac:name="type">number</ac:parameter>
<ac:parameter ac:name="separator">false</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="b612a2aa-e7b8-42e0-8965-a18b9a8635c1" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ort</ac:parameter>
<ac:parameter ac:name="fieldLabel">Veranstaltungsort</ac:parameter>
<ac:parameter ac:name="values">false[1=Fanmeile|2=Trainingsplatz 1|3=Trainingsplatz 2|4=Trainingsplatz 1&2|5=Arena 1|6=Arena 2|7=Arena 1&2|]</ac:parameter>
<ac:parameter ac:name="type">select</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="4e975807-7dae-4191-a319-db576a3b88f4" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">anzahl:[>=20]</ac:parameter>
<ac:parameter ac:name="fieldName">ort</ac:parameter>
<ac:parameter ac:name="values">ort:1 OR ort:5 OR ort:6 OR ort:7</ac:parameter>
<ac:parameter ac:name="action">Apply Filter on a field</ac:parameter>
<ac:parameter ac:name="actionFieldName">anzahl</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="f8e755cb-6458-4ae1-be23-b7b9e5051f04" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">anzahl:[<20]</ac:parameter>
<ac:parameter ac:name="fieldName">ort</ac:parameter>
<ac:parameter ac:name="values">*</ac:parameter>
<ac:parameter ac:name="action">Apply Filter on a field</ac:parameter>
<ac:parameter ac:name="actionFieldName">anzahl</ac:parameter>
</ac:structured-macro>
</p>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.