Checkboxes don't work that way. If a checkbox is not checked it does not exist in the post parameters. If it is checked it does. It is not a 0 or 1 situation but a "If it is there then it is checked and if it is not there it isn't checked".
On Wed, Jan 26, 2011 at 1:56 PM, Tobias <[email protected]> wrote: > Hello, > > I have a sfWidgetFormInputCheckbox with a specified value but it does > not render als preselected input (checked="checked"). > $this->setWidget('team1_noplayer', new > sfWidgetFormInputCheckbox(array(), > array( > 'value' => true > ) > )); > > echo $match['team1_noplayer']; > > It renders the input but without the checked attribute, although I > looked into the source of this widget and it should happen. I cannot > see why not. > Also, for some reason I cannot read $match['team1_noplayer']- > >getValue(). It returns always NULL. But on a text field it works > right this way. > Please give me a clue. > > Tobias > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<symfony-users%[email protected]> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en
