|
From: Imanol I. <ima...@gm...> - 2006-07-25 21:50:15
|
Hi
Sometimes i have similar problems. In this cases i use this code:
Controller code:
if($myDatabaseBoolean){
$this->setPlaceholder('checkedString', true);
}
Chuck code:
{if:checkedString}
<input name="mycheckbox" type="checkbox" checked="checked"/>
{else:}
<input name="mycheckbox" type="checkbox"/>
{end:}
Regards
Imanol
2006/7/25, was...@li... <
was...@li...>:
>
> Send Wasp-users mailing list submissions to
> was...@li...
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/wasp-users
> or, via email, send a message with subject or body 'help' to
> was...@li...
>
> You can reach the person managing the list at
> was...@li...
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Wasp-users digest..."
>
>
> Today's Topics:
>
> 1. Form Checkbox select checked (Flexy/Chuck) (Buddy Toups)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 24 Jul 2006 19:57:21 -0500
> From: Buddy Toups <me...@my...>
> Subject: [Wasp-users] Form Checkbox select checked (Flexy/Chuck)
> To: was...@li...
> Message-ID: <85c...@my...>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> Hi, I really new to WASP (really dig it!) and had experience with
> Smarty. Flexy is much cooler, but I have a small problem. I want to
> make a checkbox select depending on a variable from a database.
>
> 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've tried using a string and a placeholder but Flexy comes up with an
> error.
>
> Controller code:
> if($myDatabaseBoolean){
> $this->setPlaceholder('checkedString', ' checked="checked" ');
> }
>
> Chuck code:
> <input name="mycheckbox" type="checkbox" {checkedString} />
>
> If someone can please help me with this issue that would be great.
>
> Thanks,
> Buddy
>
>
>
>
> ------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ------------------------------
>
> _______________________________________________
> Wasp-users mailing list
> Was...@li...
> https://lists.sourceforge.net/lists/listinfo/wasp-users
>
>
> End of Wasp-users Digest, Vol 2, Issue 1
> ****************************************
>
|