My first taxonomy liste all 10 canadian provinces.
Then, once a user select a specific province, I want to display the specific city taxonomy.
So far I've tried to make 10 conditional display:
- If Quebec is selected, show region-qc (Quebec cities)
- If Ontario is selected, show region-on (Ontario cities)
- etc..
But it seems Toolset can only manage 3 conditional at the same time, as all others after the third one are not displaying properly.
Code is good, because if I take the 4th conditional and place it above all, CRED form will display it, and the previously "number 3th" will no longer be displayed (now "number 4th" conditional).
Is there a way I can make this simplier?
The code I use. The field region-ipe changes for each city taxonomy (cities of Quebec, Ontario...)
[cred_show_group if="($(pays-provinces) eq '3584' )" mode='fade-slide']
<div class="cred-label">[wpml-string context="cred-logement"]Région[/wpml-string]</div>
[cred_field field='region-ipe' force_type='taxonomy' output='bootstrap' display='select' single_select='true']
[cred_field field="region-ipe_add_new" taxonomy="region-ipe" type="add_new"]
</div>
[/cred_show_group]
Hello,
Toolset Forms plugin can handle multiple conditions(4 or more), there might be some server issues in your website, please try to get the PHP/JS debug logs from your website:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
HI Luo, sorry for late reply
I've succeeded to do 17 conditionals in a row for some taxonomies (all sub-divisions of Quebec province), but I still couldn't make more than 3 conditionnals in a row for other taxonomies. The moment I would add the 4th code, I would get a red </div> at the end.
But then, comparing both codes, I realised I was missing one <div> opening line at the beginning
<div class="cred-field cred-field-districs">
So that can explain why I would get a red </div> at the end of the code.
But I don't understand why the 4th code would create a <div> issue because it wasn't related in any way to the 3 previous as all codes were always inside individual conditional brakets [].
This said, now it works 🙂