Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
jmChoose default selected
elygen



Joined: 22 Feb 2007
Posts: 637

Posted: 10/06/10 09:53 
With the jmChoose function what do you pass to the selected argument to have it choose multiple items.
lets say there are 2 choices
choice 1
choice 2
choice 3

how wouldi have choice 1 and 3 selected by default.


_________________
~ Todd
=================
Happy Jamrooming
New Jersey
www.bandarray.com
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 10/06/10 14:32 
You would need to set up the value ahead of time, i.e.


Code
$default value = array();
$default_value[] = 'option 1';
$default_value[] = 'option 3';
if (!isset($value) || strlen($value) === 0) {
    $value = $default_value;
}
jmChoose('Field Name','field_name',$options,$value);


Kyle


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.