Forum OpenACS Development: how to hide fields on registration form

I found fragment of code at "/packages/acs-subsite/lib/user-info.tcl"
that can easily answer this endeless question.

ad_form -name user_info -cancel_url $return_url -action $action_url -mode $form_mode -form {
{user_id:integer(hidden),optional}
{return_url:text(hidden),optional}
{message:text(hidden),optional}
}

Then,
I ammended, reloaded the change. But surprisely it seems it doesn't work out.

"/packages/acs-subsite/lib/user-new.tcl"

ad_form -name register -export {next_url user_id return_url} -form [auth::get_registration_form_elements]
{url:text(hidden),optional}
{screen_name:url(hidden),optional}

does anyone know a way around?

Collapse
Posted by Iuri Sampaio on
Sorry i switched the datatypes

"/packages/acs-subsite/lib/user-new.tcl"

ad_form -name register -export {next_url user_id return_url} -form [auth::get_registration_form_elements]
{url:url(hidden),optional}
{screen_name:text(hidden),optional}

I get and include error. it doesn't recognize the command
Error in include template "/home/conaje/conaje/packages/acs-subsite/lib/user-new": invalid command name "screen_name:text(hidden),optional"

I expected this error would come up. It treats like the field is duplicated

Collapse
Posted by Iuri Sampaio on
Please, dismiss everything.

reading ad_form references, i found that hidden is a widget, instead of a datatype as it is on html code.
ex:
input type="hidden" size="30" ....

So nothing more logical that replacing in the api
auth::get_registration_form_elements (public)

at packages/acs-authentication/tcl/authentication-procs.tcl

the url and screen_name widgets in the array. From text-url to hidden.
There you go. The fields are gone from the UI and still working in the system, in case we need to use the in the future.