Re: select box validation in CakaPHP 1.2

2007-11-01 Thread senser
Doesn't anybody validate select_boxes? How do you render error_messages? On Oct 22, 8:10 am, senser [EMAIL PROTECTED] wrote: Hi Japheth, The problem is that if I use 'selected'='' and when form doesn't validate because wrong fields the application doesn't remember the selected value in

Re: select box validation in CakaPHP 1.2

2007-10-22 Thread senser
Hi Japheth, The problem is that if I use 'selected'='' and when form doesn't validate because wrong fields the application doesn't remember the selected value in list box. For example if user selects 2001-2002 tax year and submit form with wrong field for tax, form doesn't validate and remember

Re: select box validation in CakaPHP 1.2

2007-10-21 Thread Japheth
Hi Senser, I've managed to use showEmpty = ' ', to provide an option that is essentially blank. You could then use trim() if you found that ' ' still was counted as a value? Also, if you want to make sure that the empty option is selected by default, you could add 'selected' = ' ' to your

Re: select box validation in CakaPHP 1.2

2007-10-20 Thread senser
Hi manuj. Your proposal didn't solve my problem. I think I did read somewhere in group postings that using fromHelpr-input is the right way for form fields and using formHelper-select, formHelper-label, ... etc will be deprecated in next versions of CakePHP. I'm not sure for this and correct me

Re: select box validation in CakaPHP 1.2

2007-10-20 Thread manuj bansal
thanks for info i am not sure about it as mannual, it looks they remove $html-submit but they didn't mention their about $form-submit will be depreceated On Oct 20, 12:50 pm, senser [EMAIL PROTECTED] wrote: Hi manuj. Your proposal didn't solve my problem. I think I did read somewhere in

Re: select box validation in CakaPHP 1.2

2007-10-20 Thread manuj bansal
your problem may be solved by this link http://groups.google.com/group/cake-php/browse_thread/thread/8c89ca42d68496a0/89e2724d53aaad65?lnk=gstq=select+box+validation#89e2724d53aaad65 On Oct 20, 12:50 pm, senser [EMAIL PROTECTED] wrote: Hi manuj. Your proposal didn't solve my problem. I

Re: select box validation in CakaPHP 1.2

2007-10-20 Thread senser
I found this link while searching for resolve but it didn't help - when I use array(showEmpty='Select ...') it shows in select box but it's not selected by default and doesn't help :( May be select boxes must be validated in different manner but I don't know how On Oct 20, 12:22 pm, manuj

Re: select box validation in CakaPHP 1.2

2007-10-19 Thread manuj bansal
i didnt get your code you want select option then why r you going thru input function try it *view code echo $form-label('modelname.name') echo $form-select('modelname.name',array('value'='text')); echo $form-error('it can't be blank');

select box validation in CakaPHP 1.2

2007-10-19 Thread senser
Hi there! I'm trying to write a code for displaying a select box with several options (tax years for example) and I have to validate the data passed by that select box. I want the user to must select an option from the list. Here is the code from view file where I populate the box using

select box validation in CakaPHP 1.2

2007-10-19 Thread senser
Hi there! I'm trying to write a code for displaying a select box with several options (tax years for example) and I have to validate the data passed by that select box. I want the user to must select an option from the list. Here is the code from view file where I populate the box using