Forum OpenACS Development: Response to ad_form for new and edit requests

Collapse
Posted by Tilmann Singer on
The trick that Jon uses does not work when the validation fails.

Steps to reproduce: go to acs-person, click "New
Person". The context bar says "Create Person", correct. Enter nothing
and hit the submit button, to produce an invalid form. Now the context bar button says: "Edit Person". This happens because
ad_form has pre-generated an acs_person_id and add-edit.tcl checks for
the existence of that key.

Side note: there is also a bug in the code that sets the page_title, which results in setting it always to "Create Person".

Dave, you meant to write if { [ad_form_new_p -key ...] }, right? Yes that would work, I'll try to write such a procedure later (if you are not faster ...) and see if that would cover my use cases.