Index: openacs-4/packages/ams/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/doc/index.html,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/ams/www/doc/index.html 23 Mar 2018 23:53:01 -0000 1.6 +++ openacs-4/packages/ams/www/doc/index.html 28 Mar 2018 23:36:17 -0000 1.7 @@ -124,23 +124,23 @@

Detailed

-

For many application the AMS and ad_form shorthand will be too simplistic. For those situations, you can use ams to interface with ad_form. You need to define ad_from -form elements like this: +

For many application the AMS and ad_form shorthand will be too simplistic. For those situations, you can use ams to interface with ad_form. You need to define ad_form -form elements like this:

 ad_form ... -form [ams::ad_form::elements -package_key "contacts" -object_type "ct_contact" -list_name "contact_person"] ...
 
-

Note that this procedure returns an ad form appropriate element list. If you intending to define other elements you will need to ad_from -extend -name form_name -form ...

+

Note that this procedure returns an ad form appropriate element list. If you intending to define other elements you will need to ad_form -extend -name form_name -form ...

In the ad_form -edit_request block put

 ad_form ... -edit_request {
         ams::object::attribute::values -vars -object_id $object_id
     } ...
 
-

This returns the variables upvared into your page, i.e. the first_names attribute could be returned with a value of "Jane" and the last_name attribute with a value of "Doe"... etc. ad_from looks for all form elements and appropriately pre-fills the form with the given values.

+

This returns the variables upvared into your page, i.e. the first_names attribute could be returned with a value of "Jane" and the last_name attribute with a value of "Doe"... etc. ad_form looks for all form elements and appropriately pre-fills the form with the given values.

In the -on_submit block you enter the following:

-ad_from ... -on_submit {
+ad_form ... -on_submit {
         ams::ad_form::save \
             -package_key "contacts" \
             -object_type "ct_contact" \