[html-formfu] How to make checkbox (checked/unchecked) database driven

Carl Franks fireartist at gmail.com
Fri Jul 6 18:43:14 GMT 2007


On 06/07/07, kewei xiao <kewei.xiao at nald.ca> wrote:
> Hi Carl
>
>    Thank you for the hints.  I just want to make sure I understand them.
>
>    /'$user'/ is the current user I am viewing?
>
>    is '/is_member_of/' a real function?  if not, is there a similar one?

$user->is_member_of() was just made up - replace it with whatever is
appropriate for figuring out whether the user's an administrator.

The important part is that you set "default => $_->id" only if you
want the checkbox checked.

Carl



More information about the HTML-FormFu mailing list