Tuesday, March 31, 2009

Re: form select/javascript

You can do this:

echo $form->input('Model.year', array('onclick'=>'someAction();',
'label'=>'','style'=>"width: 60px", 'minYear' => '1983', 'maxYear' =>
date('Y')));

kurious oranj wrote:
>
>
> Hi,
>
> I'm quite new to CakePHP and need to have a SELECT with options for
> each year from 1983 to the current year. I can certainly write the
> javascript to do the loop from 1983 to current year, but what's the
> best way to call that javascript to populate the SELECT? I just need
> the general mechanism.
>
> Thanks
>
> >
>
>

--
View this message in context: http://www.nabble.com/form-select-javascript-tp22808833p22817340.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
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: