Forum OpenACS Development: HTTP GET support for ad_form?

Collapse
Posted by Dave Bauer on
I am using ad_form to present a few dropdown boxes to apply to filter what rows are displayed on a page, similar to bugtracker.

It would be nice to use the GET method for this form, but ad_form adds so many hidden state variables, it does not really work, and in one case, seemed to make the URL too long for IE.

I am wondering if it would be a good idea to have an option to ad_form to leave out all the state management for this type of form. We are just using the form to get data from the system, not add or edit data, so it is not really needed.

Comments?

Collapse
Posted by Dave Bauer on
Note: I realize ad_form does support the GET method by specifying the -method GET parameter to ad_form, it just doesn't work quite as I wanted it to.
Collapse
Posted by Don Baccus on
Do we really want ad_form to turn into a 78-bladed Swiss Army knife?

ad_form started life as a nice, simple tool to help tame the form builder.  Now I'm getting the feeling that we're going to add and add to it until it not only will cook our dinner, but clean up the kitchen afterwards!

ad_form only adds two state variables unless you use they key management feature (not appropriate for the use you're describing): __confirmed_p and __refreshing_p.

Any other state variables you're seeing coming from the form builder, and surely we're not going to provide a mode that decouples ad_form from the form builder ...

Collapse
Posted by Don Baccus on
__confirmed_p could be removed if no -confirm_template param is passed in.  __refreshing_p is more problematic since we don't actually tell ad_form if we're using Javascript widget-mungers, nor does the generalized param handler allow for simple switches without value blocks.

I suppose if people really think something like this is ultra-desirable we could add a -javascript true switch.

Collapse
Posted by Dave Bauer on
ok :) Nevermind.

I see your point. It really shouldn't be a problem doing what I am doing anyway. I will look into it further, but it looks like it is not ad_form's fault.

Collapse
Posted by Jeff Davis on
you could also do a redirect after validating the form with just the variables you want (which would make for a more pleasant url anyway).  There is an example of something like this in dotlrn/www/admin/users-search.tcl (not with ad_form
but you get the idea).