Multiple Fields in CMS Drop Down

5 posts by 3 authors in: Forums > CMS Builder
Last Post: June 1, 2012   (RSS)

Re: [nmsinc] Multiple Fields in CMS Drop Down

By ross - May 23, 2012

Hi there.

Is all of this code going into the custom field in your section editor? Also, are the city & state fields actually in the same table you are searching in?

There will be a way to make this all happen. Let's get me up to speed with how things are setup first though :).

Let me know what you think. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Multiple Fields in CMS Drop Down

By nmsinc - May 31, 2012

Hi Ross,

Sorry for the delay - this is within the CMS section editor and the city and state fileds are within the same table as the company name!

Thanks - nmsinc
nmsinc

Re: [nmsinc] Multiple Fields in CMS Drop Down

By Jason - June 1, 2012

Hi,

Are you looking to add the city and state to the option label of the drop down?

If so, you can use the mySQL CONCAT function like this:

SELECT num, CONCAT(member_company_name, "-", city, ", ", state)
FROM `<?php echo $TABLE_PREFIX ?>member_companies`
<?php echo $where; ?>
ORDER BY member_company_name


In this example, options would appear in the format

company_name - city, state

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/

Re: [Jason] Multiple Fields in CMS Drop Down

By nmsinc - June 1, 2012

That works - thanks Jason!

nmsinc
nmsinc