I am trying to:
Output data value in conditional blocks
----------Code
[wpv-conditional if="( $(wpcf-tipo-di-data) eq '1') AND ($(wpcf-data-inizio-evento) ne '')"]
<p id="sch11">Data: [types field='data-inizio-evento' format="d/m/Y"][/types]</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-tipo-di-data) eq '2' ) AND ( $(wpcf-data-inizio-evento) ne '') AND ( $(wpcf-data-fine-evento) ne '' )"]
<p id="sch11">Data inizio:[types field='data-inizio-evento' format="d/m/Y"][/types]</p>
<p id="sch111">Data fine:[types field='data-fine-evento' format="d/m/Y"][/types]</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-tipo-di-data) eq '3') AND ($(wpcf-data-ripetibile) ne '' )"]
<p id="sch1">Date:</br>[types field='data-ripetibile' format="d/m/Y G:i " separator='</br>'][/types]</p>
[/wpv-conditional]
Link to a page where the issue can be seen:
I expected to see:
e.g:
if tipo-di-data==2 AND data-inizio-evento =! "" AND data-fine-evento =! ""
PRINT:
Data inizio: 13/09/21
Data fine: 16/09/21
Instead, I got in my front-end page:
Data inizio:[types field='data-inizio-evento' format="d/m/Y"][/types]
Data fine:[types field='data-fine-evento' format="d/m/Y"][/types]
Do the types shortcodes work if you move them outside of the conditional shortcodes?
The Types plugin is active, yes?
I suspect we may need access to your site to investigate, as it is not something we would be able to replicate.
Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.
Can you also confirm the url of where we can see the problem.
When using the Toggle module it does not able to parse the Toolset shortcode, so what I've done is, I've created the following content template and added all the code you added to "toogle module" to this content template:
=> hidden link
And then within your toggle module, I've added the above content template as given under:
Hello there!
It seems to work but with conflicts. For example in this post hidden link if you're logged as admin it works, but if you're not logged in it doesn't work. This is weird, because with other posts toolset works well.
I thought it was a cache problem, so I added this cose string in functions.php: add_filter( 'wpv_filter_disable_caching', '__return_true' ); //reflush cache view; but it's not enough.
I compared it with another post with the same structure (hidden link), but they look alike.
Thank you