Forum OpenACS Development: Re: how to hide fields on registration form

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.