Forum OpenACS Development: Re: Automatic form generation revisited

Collapse
Posted by tammy m on
Hi Lars,

There was a discussion of 2 different approaches being taken to auto-form generation in the CMS and Ded's Classified-Ads in CMS forms + widgets versus Classified Ads forums posting. I sent Dave Bauer a copy of the tweaked Ded's code I am currently using to auto-generate forms from the db using CMS and also to save CR objects back to the CR from the auto-generated forms. It still links the forms elements/datatypes to ACS constructs (as Don Baccus pointed out is wanted) but doesn't have quite as many levels of abstraction as does the CMS/CR acs_objects attributes model. That model was just too hard to work with for my purposes and the possibly added flexibility didn't seem worth extra work, learning curve and maintenance to me:(

Collapse
Posted by Randy O'Meara on
I've kind of wandered into this space (auto form generation) and read this thread and the one that Tammy referenced above. I looked for Lars' simulation/www/object-edit.tcl in CVS and didn't see it, so I don't know what direction he's heading.

In the mean time...

Tammy, can you send (or point me toward) the sample code you've developed?

Thanks,

Randy

Collapse
Posted by Randy O'Meara on
Thank you, Lars. This looks like it will be helpful.

Randy

Collapse
Posted by tammy m on
Randy,

I'll package this up and send it to ya. I can't claim I developed it as most of it came from Deds Castillo's Classified Ads package that I got a copy of. I just pulled it out of the Ads package and threw together a package that only had the CMS and FORMS related stuff in it, in a more generic format. I have to mention that I have altered my base OACS code in some minor ways and you might run into that (added optional parameters to some template::form procs so I wouldn't have to have to do things like check if a form element existed for every element when inserting/updating a form in the db). I really should clean that up and I mean to try to take a look at those cases and keep my OACS base code more compatible with the "real" base... some day...

In the meantime, I'll send ya a tar of the package. I'm on OACS 4.6.1 btw.