Re: Replacing an select/option drop down in views to a specific value.

2010-01-18 Thread Guran
Thanks - that helped 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 unsub

Re: Replacing an select/option drop down in views to a specific value.

2010-01-17 Thread websurfshop
Have a look at the controller action "add" you are calling. Note the name of the variable being set from the find (or read). At the top of your add.ctp add the line Relaunch the page again and have a look at the array produced from the find. Then on the line input form options you can set the

Re: Replacing an select/option drop down in views to a specific value.

2010-01-15 Thread Guran
John; Thanks for the response. I am sorry I did not understand. I am a newbee. the code input('employee_id'); ?> generated by cake produces a drop down of all employee names in the database. Instead I want to present only the name of the logged in employee since the expense statement will be filed

Re: Replacing an select/option drop down in views to a specific value.

2010-01-15 Thread John Andersen
Can the employee choose another employee id in the select list? If the employee is not allowed to choose another employee id, then just show the existing employee id as a label, not a list. For preselecting the employees id in the select list, add the employees id to the controllers data variable,

Replacing an select/option drop down in views to a specific value.

2010-01-15 Thread Guran
I am building a expense submitter system. I have employees who have a "name field" and an "employee_id field". In the view - views/expenses/add.ctp Cake has generated the following code: input('employee_id'); ?>. This results in a select/ option drop down listing all the employees. Through a login