Show/hide some predefined text on Detailpage with checkbox
Here are some steps to show/hide content based on a checkbox in CMS Builder:
- Add a checkbox in CMS Builder called "Show Featured Content" for example. Set the Default State radio button to Checked. And add text in the "Field Description" like this: Uncheck to hide Featured Content
- Generate to code for the checkbox and add it to your template along with the IF statement like this:
<?php if($record['show_featured_content'] == 1) : //if checkbox is checked then show the content ?>
Predefined text here <br />
<?php endif; ?>
That should be it. Try this out and let me know if you have any questions or issues.
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.