UncaYimmy Registered Users
 Nuke Newbie Posts:8

 |
| 7/21/2008 8:54 PM |
|
Maybe I'm just tired, but for some reason I'm not seeing an easy way to work with checkboxes in a template. What I'm looking for is to display the caption and use the value from CUSTOM:MyCheckboxField to determine whether a checkbox is checked or not. From what I can see the default INPUT Type-Checkbox is checked if there's any valued assigned to Checked.
Any tips would be greatly appreciated. |
|
|
|
|
Scott McCulloch Administrators
 Nuke Master Posts:12550


 |
| 7/23/2008 10:00 AM |
|
| Not sure I understand the problem, your [CUSTOM:CheckBoxField] is not displaying correctly? |
|
Scott McCulloch Site Administrator |
|
|
UncaYimmy Registered Users
 Nuke Newbie Posts:8

 |
| 7/23/2008 12:33 PM |
|
| It displays True or False. What I want is a checkbox control that is checked or not checked. |
|
|
|
|
Scott McCulloch Administrators
 Nuke Master Posts:12550


 |
| 7/23/2008 7:13 PM |
|
You should be able to use the EXPRESSION token to do this. [EXPRESSION:CustomFieldID:=:True]checked[/EXPRESSION:CustomFieldID:=:True] A complete list of tokens can be found in the template guide. |
|
Scott McCulloch Site Administrator |
|
|
Kurt Noppe Registered Users
 Nuke Newbie Posts:6

 |
| 7/30/2008 6:25 AM |
|
Hey, I use multicheckbox. When i use the expression you suggest, it doesn't work. I have two possibilities: 1. Loop through the multicheckbox and show every item in a list (ul/li) 2. Show every element with a checkbox before it (checked/unchecked) Thanks for helping me. |
|
|
|
|
Scott McCulloch Administrators
 Nuke Master Posts:12550


 |
| 7/30/2008 6:28 AM |
|
When you say it doesn't work, can you explain further? The above expression is to optionally check a checkbox in the template. Did you substitute CustomFieldID for the name of your custom field? |
|
Scott McCulloch Site Administrator |
|
|
Kurt Noppe Registered Users
 Nuke Newbie Posts:6

 |
| 7/30/2008 6:35 AM |
|
The name for my multicheckbox is 'Options' so i change the expression to: [EXPRESSION:Options:=:True]checked[/EXPRESSION:Options:=:True] are you sure this also works for multicheckbox. I also want to know how i can loop the content of a multicheckbox. |
|
|
|
|
Scott McCulloch Administrators
 Nuke Master Posts:12550


 |
| 7/30/2008 6:45 AM |
|
For multi-checkbox it will display the name of the field rather than true/false because multiple options can be selected. If you use [CUSTOM:Options], you can see what is being displayed. There is no real way to loop through content for the multicheckbox, but I could probably add a token for it |
|
Scott McCulloch Site Administrator |
|
|
Kurt Noppe Registered Users
 Nuke Newbie Posts:6

 |
| 7/30/2008 6:52 AM |
|
I don't want to display the options like this: option1, option 2, option 3 (Driver Air Bag, Passenger Air Bag, Child Seat) but * option 1 * option 2 * option 3 Do you think it's possible? |
|
|
|
|
Scott McCulloch Administrators
 Nuke Master Posts:12550


 |
| 7/30/2008 6:58 AM |
|
| At the moment, the tokens allow you to only display the options comma separated, I can add an option in so you can format it into a unordered list. |
|
Scott McCulloch Site Administrator |
|
|
Kurt Noppe Registered Users
 Nuke Newbie Posts:6

 |
| 7/30/2008 7:01 AM |
|
| That would be great. |
|
|
|
|
Scott McCulloch Administrators
 Nuke Master Posts:12550


 |
| 7/30/2008 7:03 AM |
|
OK - I've recorded the item, keep an eye on the announcements forum for an update. |
|
Scott McCulloch Site Administrator |
|
|