[Resolved] Conditional display not working (CRED) – Not recognizing variable
This support ticket is created 2 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I thought it would be a problem with the accent, so I tried with "Laval", but it's still not working
[cred_show_group if="($(region-qc) eq 'Laval' )" mode='fade-slide']
<div class="cred-field cred-field-quartier-laval">
<div class="cred-label">[wpml-string context="cred-logement"]Sélectionnez votre quartier[/wpml-string]</div>
[cred_field field="quartier-laval" post="logement-accessible" value="" urlparam=""]
</div>
[/cred_show_group]
When I'm trying to use the GUI, the field region-qc is not listed.
I've validated the names, and it's well written, see image.
Page : hidden link (just below the map)
Hello. Thank you for contacting the Toolset support.
Indeed you should use the English text only and other accent are not supported.
Can you please share admin access details as I would like to see why Lavel is not working as I can see that the conditional group works based on term name with my test site.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I've adjusted the conditional group [cred_show_group] code to compare the taxonomy term when its displayed as select as given under. As you display the term with select box you will have to compare with the term ID.
Ok. So the code is the same, but we change the type of comparison
- Checkbox mode = we use the name of the term ('Laval')
- Dropdown list mode = we use the ID of the term ('1486')