Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

„ConfiForms - Dropdown field filter based on participant number

Enrico Mancuso
Contributor
May 9, 2025

 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:[&lt;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!

2 answers

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
May 9, 2025

Hi @Enrico Mancuso 

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

Enrico Mancuso
Contributor
May 12, 2025

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&amp;2|5=Arena 1|6=Arena 2|7=Arena 1&amp;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:[&gt;=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:[&lt;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>

Alex Medved _ConfiForms_
Community Champion
May 12, 2025

Remove [] around your values in filters

anzahl:[<20]

should be

anzahl:<20

Same for the other rule's condition

Alex

Enrico Mancuso
Contributor
May 12, 2025

perfect it Works thanks a lot

0 votes
Enrico Mancuso
Contributor
May 12, 2025

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&amp;2|5=Arena 1|6=Arena 2|7=Arena 1&amp;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:[&gt;=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:[&lt;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>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events