[solved] CompanyDirectory - displaying only checked boxes
Posted: Tue Mar 06, 2012 9:24 pm
I have a number of field definition entries as checked boxes (options of what type of work a company is doing...which could have multiple entries).
I am trying to only display the values of the entries of the checkbox value is 'true' in the Details Template. Currently the code below calls all the entries and puts 'true' or 'false' behind the entry (as it obviously should:
I have tried calling each of the entries individually with:
But this is also not working (nothing is displayed).
I have CMSMS 1.10 and CD 1.13.
Any advice would be great.
Thanks
Dewald
I am trying to only display the values of the entries of the checkbox value is 'true' in the Details Template. Currently the code below calls all the entries and puts 'true' or 'false' behind the entry (as it obviously should:
Code: Select all
{if isset($entry->fields) }
{foreach from=$entry->fields key='field_name' item=customfield}
{$customfield->name}: {$customfield->value}<br />
{/foreach}
{/if}
Code: Select all
{if $entry->customfieldsbyname.Yourname ne ''}
{$entry->customfieldsbyname.Yourname}
{/if}
I have CMSMS 1.10 and CD 1.13.
Any advice would be great.
Thanks
Dewald