On 05/07/07, kewei xiao <[EMAIL PROTECTED]> wrote:
Now I set up the 'default' to be checked. Is it a way to make it unchecked according to a certain condition? In my case the condition will be the non-administrator users' checkbox will be un-checked:
It will be checked it 'default' equals 'value', so you want something like this pseudo-code: $self->elements( [ map { { type => $type, name=>'role', value=> $_->id, label => $_->name, default => ( $user->is_member_of($_->id) ? $_->id : undef ), } } $roles->all ] ); _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu