On Apr 1, 11:26 am, kurious oranj <[email protected]> wrote:
> How do I find out the value that's been selected in PHP and also, I
> use isset() on the input fields, how do I check if the dropdown value
> is null?
The selected value should be stored in $this->data just like the rest
of the form data. So, it'd be possibly stored somewhere like
(depending on if there were single or multiple sets of input fields
for a single model): $this->data['Model']['fieldname']
Also, if you're using the null value as a placeholder for a "none
selected" type of option, then you can actually tell Cake to
automatically include such an "empty" option by setting the third
parameter to true (which is the default), or simply: echo $form->year
('Model.fieldname', 1983, date("Y"));
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---