Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
linkmat Posted June 13, 2015 Posted June 13, 2015 Hi, im working on a project and i try to figured out how to show Multiselect in IP.Page i was try to use the same script for the bug tracker {{if intval( $formValue ) === 1}} <span class='c4StatusBadge c4StatusBadge_upNext'>{$value}</span> {{elseif intval( $formValue ) === 2}} <span class='c4StatusBadge c4StatusBadge_comingSoon'>{$value}</span> {{elseif intval( $formValue ) === 3}} <span class='c4StatusBadge c4StatusBadge_future'>{$value}</span> {{elseif intval( $formValue ) === 4}} <span class='c4StatusBadge c4StatusBadge_done'>{$value}</span> {{endif}} but they didnt show individual someone can help me
opentype Posted June 13, 2015 Posted June 13, 2015 $formValue is only the correct call within the field’s custom code field. In a Pages template you need to call the field by it’s field id or field name. You find the latter in the field’s settings. The call will also depend on whether you are in a listing or record view template, e.g. $row->field_id or $record->field_idAlso that code will only work if your “multi-select” field really allows only one choice.
linkmat Posted June 13, 2015 Author Posted June 13, 2015 yes with {$record->customFieldDisplayByKey('my_key')|raw} but they display all in the same box in the same color what i want to do its 1 Choice 1 color in a multi select drop down like with ips_badge : choice 1 = red Choice2 = blue choice 3 = orange Choice 4 = orange but this is what i want to do but not only with 1 choice but 5 choice and u cant select 5 choice ... this is 2 dropdown menu
opentype Posted June 13, 2015 Posted June 13, 2015 yes with {$record->customFieldDisplayByKey('my_key')|raw} but they display all in the same box in the same color Sure, because the different options are merged to one string. You need to explode them first. ;-) That was for images, but it’s the same principle for multi-select box results.
linkmat Posted June 13, 2015 Author Posted June 13, 2015 its suppose to be like this ? {{if $record->field_23} {{$fieldvalue = explode(',',$record->field_23);}} {{foreach}} {{endforeach}} {{endif} sorry im a real NOOB in Php my strong thing is Css and html and my english too its a bit poor
Recommended Posts
Archived
This topic is now archived and is closed to further replies.