Forum OpenACS Development: Re: TCL API for acs_object_types

Collapse
Posted by Barry Books on
I'm going to dig around CMS today. I'll look into it's form generation code. I would like to see a self documenting ad_form widget interface similar to the ad_page_contract validation system. It would be great if you could do something like ad_from::create_widget foo and have foo show up in the api-docs. They also need to be added to acs_datatypes so you can use them as datatypes in acs_attributes.

My previous system built the entire form then cached it because our forms often and hundreds of elements. I originally used the templating system but with hundreds of elements it took several seconds to build a form. I think that use was really a special case and most objects only have a handful of attributes.

A -object_type option to ad_form might be a good way to go especially if you could specify attributes and perhaps multiple objects

-object_types {
{foo}
{bar {bar1 bar2}
}