|
From: <me...@my...> - 2006-07-26 16:19:59
|
Thanks for the advise Jay,
It looks like it works prefect for other form elements that use the
"value" attribute but it did not work for the checkbox. I guess the
checkbox differs because it uses the "checked" attribute not the
"value" attribute. Is there a way to set individual attributes in a
Chuck Object? I saw a method in the Flexy documentation.
If anyone can figure a better way than using "flexy:if" "flexy:ignore"
great. If not it would be cool to implement a new method that modifies
attributes of an element.
Thanks,
Buddy
> -------- Original Message --------
> Subject: Re: [Wasp-users] Form Checkbox select checked (Flexy/Chuck)
> From: Jason Penney <jp...@jc...>
> Date: Wed, July 26, 2006 6:54 am
> To: Buddy Toups <me...@my...>
> Cc: was...@li...
>
> Buddy Toups wrote:
> > This is what I want outputted if the preset value is true:
> > <input name="mycheckbox" type="checkbox" checked="checked" />
> >
> > or if its false:
> > <input name="mycheckbox" type="checkbox" />
>
> I Might be mis-remembering how I did this, and I'm unable to check at
> the moment, but I thought you could use setFormElement to do this.
>
> in chunk:
> <input name="mycheckbox" type="checkbox" />
>
> in Controller:
> if($myDatabaseBoolean){
> $this->setFormElement('mycheckbox',true);
> }
>
> or even
>
> $this->setFormElement('mycheckbox',$myDatabaseBoolean);
>
>
>
> Does that work?
>
> Jay
>
> --
> Jason C Penney (jp...@jc...)
> http://www.jczorkmid.net/~jpenney/
|