Check boxes results shown as a drop down menu

13 posts by 2 authors in: Forums > CMS Builder
Last Post: September 28, 2010   (RSS)

By Mikey - September 27, 2010 - edited: September 27, 2010

Jason, can I trouble you with another question.
Can you show me how to sort my results in the drop down menu alphabetically?

Thanks,
Zick

Re: [zickey] Check boxes results shown as a drop down menu

By Jason - September 28, 2010

Hi Zick,

Sure, all you need to do is add an "orderBy" to the getRecords command where you're selecting your flavors.

I believe the field that your storing the name in is called "flavor", if not, you'll need to change it in the example below:

// drop down jellybean flavor selector
list($jellybeansFlavorsRecords, $jellybeansFlavorsMetaData) = getRecords(array(
'tableName' => 'flavors',
'orderBy' => "flavor asc",
));


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/