Forum OpenACS Q&A: Re: ad_form skips on_submit and after_submit code

Collapse
Posted by Dave Bauer on
I am not sure why you are using a form to collect the data and then redirecting with all the data to another script.

You should put all the processing instructions in the on_submit block.

Also if you need to redirect look at using

export_vars

procedure to build the URL instead of creating a string.

Collapse
Posted by David Siktberg on
Re Dave's comment on proper usage, I would love to learn how to use ad_form, but the documentation I have found seems light on examples, the ad_form code seemed a bit dense to read and understand on its own, and therefore a long sit-down and read-thru and pondering seemed called for, and I have never found the time to do that. Could someone be generous enough to post a good example or two showing some significant functionality in a page that obtains and processes input? That will be a fast way to learn, and I would be very, very grateful. Or if there is documentation with examples somewhere that would also be great to learn about. Thanks!!
Collapse
Posted by Ryan Gallimore on
Hi David,

There are loads of examples in the code itself - just grep ad_form.

Here is also a good reference:

https://openacs.org/storage/view/ad-form-quick-ref.pdf

And the OpenACS Tutorial:

https://openacs.org/storage/index?folder_id=2855304

Cheers.

Collapse
Posted by Gustaf Neumann on
See for a collection of articles as well under: https://openacs.org/rubick/