Good day team
In brief: I would like to use the conditional output in a CRED post form where multiple taxonomies apply in 1 posttype.
What has been done:
- There is 1 post type
- This postal type has multiple taxonomies
- CRED form to post a post has been created and linked to the Posttype
I am very convinced that everything is set up properly.
When I add a conditional input that relates to the 1st created taxonomy, everything goes well, the field is displayed on the frontend when the condition is met. It will not work with the taxonomies created later and linked to the same post type.
An example of the code
<!-- The taxonomie fields that the user must fill in (select field) -->
<label>Label name:</label>
[cred_field field='taxonomie-name-1' force_type='taxonomy' output='bootstrap' display='select' single_select='true']
<label>Label name:</label>
[cred_field field='taxonomie-name-2' force_type='taxonomy' output='bootstrap' display='select' single_select='true']
<!-- These fields must be shown or hidden -->
<!-- taxonomy 1 does work -->
[cred_show_group if="( $(taxonomie-name-1) eq '1' ) OR ( $(taxonomie-name-1) eq '2' ) OR ( $(taxonomie-name-1) eq '3' ) " mode="none"]
<div class="form-group">
[cred_field field='fieldname' force_type='field' class='form-check-input' output='bootstrap']
</div>
[/cred_show_group]
<!-- taxonomy 2 does not work -->
<!-- Example not ok, field is always showing, should only be showing when select for example taxonomie-name-2 = 1 -->
[cred_show_group if="( $(taxonomie-name-2) eq '1' ) OR ( $(taxonomie-name-2) eq '2' ) OR ( $(taxonomie-name-2) eq '3' ) " mode="none"]
<div class="form-group">
[cred_field field='fieldname' force_type='field' class='form-check-input' output='bootstrap']
</div>
[/cred_show_group]
It is strange but it seems that conditional output only works with the first created taxonomy linked to a post type.
Taxomies created later do not seem to work. I have tested with multiple taxonomies but only the 1st one works
The ID numbers and slugs used have been entered correctly, I have checked this.
Do you have an idea what this could be?
Thanks in advance for your help
Greetings Pascal