Forum OpenACS Development: Re: OACS Groups within registration form

Collapse
Posted by Antonio Pisano on
Hi Iuri,

there are probably different ways to accomplish what you need, such as overriding the vanilla login form, creating a callback or let user choose the group as an extra step in a wizard fashion... afaik there is no other "special trick" one could suggest you for this on openacs

I have never used it, but maybe you will find [1] convenient for your purpose.

[1] https://openacs.org/api-doc/proc-view?proc=template::widget::party_search&source_p=1

Ciao

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"}
}
}
}
}