Register   Login
     
  Latest Posts  
RE: File Links in feeds
by smcculloch on 12/02/2008 1:53 PM
Was create new album always in add photo?
by crocklobster on 12/02/2008 1:41 PM
JQuery Error in IE6
by rodneyjoyce on 12/02/2008 9:10 AM
RE: Language Packs?
by sschneider on 12/02/2008 8:38 AM
SUMMARY tag
by adski on 12/02/2008 7:55 AM
RE: Integration with UserProfile StoryFeed
by aviavia on 12/02/2008 7:43 AM
RE: Integration with UserProfile StoryFeed
by aviavia on 12/02/2008 7:41 AM
RE: Cache issue?
by jlatulippe on 12/02/2008 4:43 AM
RE: Cache issue?
by smcculloch on 12/02/2008 3:37 AM
RE: Cache issue?
by jlatulippe on 12/02/2008 3:35 AM
  Forums  
Subject: Checkboxes in Templates
Prev Next
You are not authorized to post a reply.

Author Messages
UncaYimmyUser is Offline
Registered Users
Nuke Newbie
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 McCullochUser is Offline
Administrators
Nuke Master
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
UncaYimmyUser is Offline
Registered Users
Nuke Newbie
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 McCullochUser is Offline
Administrators
Nuke Master
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 NoppeUser is Offline
Registered Users
Nuke Newbie
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 McCullochUser is Offline
Administrators
Nuke Master
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 NoppeUser is Offline
Registered Users
Nuke Newbie
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 McCullochUser is Offline
Administrators
Nuke Master
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 NoppeUser is Offline
Registered Users
Nuke Newbie
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 McCullochUser is Offline
Administrators
Nuke Master
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 NoppeUser is Offline
Registered Users
Nuke Newbie
Nuke Newbie
Posts:6

7/30/2008 7:01 AM  
That would be great.
Scott McCullochUser is Offline
Administrators
Nuke Master
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
You are not authorized to post a reply.
Forums > Modules > Property Agent > Checkboxes in Templates



ActiveForums 3.7