plainblack.com
Username Password
search
Bookmark and Share

    

Default values for user profile checkbox list

User rogier
Date 6/30/2010 6:12 am
Views 586
Rating 0    Rate [
|
]
Previous · Next
User Message
rogier

If I have a checkbox list user profile field, with the possible values defined like this:

{
"foo"=>"bar",
"foo2"=>"bar2",
"foo3"=>"bar3"
}

Is it possible to select all of them by default, and if so, what's the syntax for that?

If I set the default value to ["foo"] it works for that option. So far so good. I expected ["foo","foo2","foo3"] to work, but it doesn't.

Is this a bug or is there anything else I should try?

 

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl

--- (Edited on 30-06-2010 13:12 [GMT+0200] by rogier) ---



Back to Top
Rate [
|
]
 
 
martien

If I have a checkbox list user profile field, with the possible values defined like this:

{
"foo"=>"bar",
"foo2"=>"bar2",
"foo3"=>"bar3"
}

Is it possible to select all of them by default, and if so, what's the syntax for that?

If I set the default value to ["foo"] it works for that option. So far so good. I expected ["foo","foo2","foo3"] to work, but it doesn't.

 

Add 'multiple="1"' to extras.

This worked for me.

--- (Edited on 01.07.2010 23:10 [GMT+0200] by martien) ---



Back to Top
Rate [
|
]
 
 
rogier

Add 'multiple="1"' to extras.

This worked for me.

--- (Edited on 01.07.2010 23:10 [GMT+0200] by martien) ---

 

Thanks for the suggestion, but it sounds like the solution for a different problem. Checkboxes have no multiple attribute, select lists do.

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl

--- (Edited on 05-07-2010 13:05 [GMT+0200] by rogier) ---



Back to Top
Rate [
|
]
 
 
martien

Thanks for the suggestion, but it sounds like the solution for a different problem. Checkboxes have no multiple attribute, select lists do.

You're right!

Now I tested with checkboxes and it still works!!??

--- (Edited on 2010-07-05 21:10 [GMT+0200] by martien) ---



Back to Top
Rate [
|
]
 
 
rogier

Well, I got it to work. The reason why it wasn't working was a combination of caching and a PEBCAK error.

So ["foo","foo2","foo3"] works OK.

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl

--- (Edited on 06-07-2010 18:16 [GMT+0200] by rogier) ---



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved