DMXzone Database Connector PHP Support Product Page
Answered
Advanced conditional region
Asked 27 May 2016 10:09:39
1
has this question
27 May 2016 10:09:39 David Woolley posted:
I need to show/hide html content depending on whether a field value exists or not.Previously I used your Advanced Conditional Region with DW server behaviors to achieve this.
How would I do this with the Database Connector?
Or would I have to code each block that I need to show/hide like so:
<?php if (isset({{product}})) { ?> <p>Product:<br /> <?php echo {{product}}; ?></p> <?php } ?>
Replies
Replied 27 May 2016 10:15:11
27 May 2016 10:15:11 Teodor Kuduschiev replied:
Replied 27 May 2016 10:39:43
27 May 2016 10:39:43 David Woolley replied:
Thanks - I see now
Enclose the content one wants to show/hide in a DIV then div.data.show on the field.
Enclose the content one wants to show/hide in a DIV then div.data.show on the field.
Replied 27 May 2016 10:51:22
27 May 2016 10:51:22 Teodor Kuduschiev replied:
Yes:
1. Select the binding, you want to check if exists or not, in the data bindings query tree (data bindings panel)
2. Select the tag you want to hide/show (make sure to select the tag in the properties inspector, for more precise selection)
3. Apply data.show or data.hide depending on if you want to show or hide the element if the binding has a value.
1. Select the binding, you want to check if exists or not, in the data bindings query tree (data bindings panel)
2. Select the tag you want to hide/show (make sure to select the tag in the properties inspector, for more precise selection)
3. Apply data.show or data.hide depending on if you want to show or hide the element if the binding has a value.