Tuesday, November 2, 2010

Select Box Values

I have a form that has a select box:

echo $form->input('location',array('type'=>'select','options'=>
$locations));

The form action populates the select box with locations:
$this->set('locations',$this->Result->find('list',array('fields' =>
array('location'),'group'=>array('location'))));

However the problem is that the select box is not taking the
"location" field value but the first column value instead. How can I
have the select box be populated with the actual field value of
location.

Just to clarify, the field is displaying correctly it is just the
values being submitted that are not working.


Thanks in advance. Also I want to say I really appreciate the help of
everyone in this group, you have been a great help!!

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: