Hidden checkbox

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 21, 2019   (RSS)

Hi MercerDesign,

Try using a 'where' in your get records call to allow both hidden and not hidden records to be read, as in this example:

list(your_tableRecords, $your_tableMetaData) = getRecords(array(
    'tableName'   => 'your_table',
     'where'    => " hidden = '0' ", 
    'orWhere'    => " hidden = '1' ", 
  ));

and then try an if statement around the div so only when hidden== '0' OR hidden == '' (empty) for a particular record, the entire div will show on the page.

something like:

<?php foreach ($your_tableRecords as $record): ?><?PHP if ($record['hidden'] == '0' ||  hidden == '' ):?> <div> your code </div> <?php endif ?>

Hope that helps.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php