Displaying Checkboxes from a "List" field type as a vertical column

3 posts by 2 authors in: Forums > CMS Builder
Last Post: January 26, 2011   (RSS)

Re: [jkoveos] Displaying Checkboxes from a "List" field type as a vertical column

By Mikey - January 26, 2011

See if this works for your list:

<ul>
<?php $vehicleList = getListLabels('limousinefleet', 'amenities', $limousinefleetRecord['amenities']) ?>
<?php foreach($vehicleList as $vehicleListed): ?>
<?php if ($limousinefleetRecord['amenities']): ?>
<li><?php echo htmlspecialchars($vehicleListed) ?></li>
<?php endif ?>
<?php endforeach ?>
</ul>

Re: [zick] Displaying Checkboxes from a "List" field type as a vertical column

By (Deleted User) - January 26, 2011

Thanks for the example...
I ended up playing around with it for a while longer and I was on the right track, I just didn't take it far enough. I got it working perfectly for my needs using this

<?php $amenities = getListLabels('limousinefleet', 'amenities', $limousinefleetRecord['amenities']);?>
<ul class="amenities"><?php foreach ($amenities as $amenities): ?>
<li><?php echo $amenities;?></li>
<?php endforeach ?> </ul>


Seen here: http://bostonlimos.co/fleetDetails.php?Towncar---Lincoln-Executive-L-2