Forum OpenACS Development: Re: OACS Groups within registration form

Collapse
Posted by Iuri Sampaio on
Right there Antonio,

I'm going to create a new select widget to let the user to choose the group, as an extra step in a wizard fashion,. Thus, I'd like to reuse what is already within the registration form and its core sources and procs.

For example, see the chunk of code bellow, related to groups, that I'd like to reuse (if possible)

if { [info exists rel_group_id] && $rel_group_id ne "" } {
ad_form -extend -name register -form {
{rel_group_id:integer(hidden),optional}
}

if { [permission::permission_p -object_id $rel_group_id -privilege "admin"] } {
ad_form -extend -name register -form {
{rel_type:text(select)
{label "Role"}
{options {[group::get_rel_types_options -group_id $rel_group_id]}}
}
}
} else {
ad_form -extend -name register -form {
{rel_type:text(hidden)
{value "membership_rel"}
}
}
}
}