How to Add Drop Down List Field with Values Loaded from the CMS

Re: [Rusty] How to Add Drop Down List Field with Values Loaded from the CMS

By Jason - December 14, 2010

Hi Rusty,

What's happening is your outputting $value in 2 places instead of using $label in the other. You can also remove the "htmlspecialchars()" function if you don't want display the encoded value (ie < instead of &lt;)

Try this:

<option id="<?php echo $id ?>" value="<?php echo $value ?>" <?php checkedIf(@$_REQUEST[$fieldname], $value) ?> /><?php echo $label ?></option>

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] How to Add Drop Down List Field with Values Loaded from the CMS

By Rusty - December 14, 2010

Thanks for the rapid response. Sometimes these minor code oversights can be the ones that give you the most trouble. Thanks [sly]
Rusty