Forum OpenACS Development: Why the order of ad_form -extend does matter?

Request notifications

When written as in ad_form -name item -extend ... , it returns invalid switch error, as described below.

While ad_form -extend -name item ..., works just fine.

Error in include template "/packages/custom-pkg/lib/add": Invalid switch -extend (expected one of -form, -method, -action, -mode, -html, -name, -select_query, -select_query_name, -new_data, -on_refresh, -edit_data, -validate, -on_submit, -after_submit, -confirm_template, -on_request, -new_request, -edit_request, -export, -cancel_url, -cancel_label, -has_submit, -has_edit, -actions, -edit_buttons, -display_buttons, -show_required_p, -on_validation_error, -fieldset)

The order of switches shouldn't matter in an ad_proc, should it?

Posted by Iuri Sampaio on
Quick reference: /api-doc/proc-view?proc=ad_form&source_p=1
Posted by Gustaf Neumann on

Dear Iuri,

in the corrent versions of OpenACS the order does not matter, as the following example shows:

ad_form -name foo
ad_form -extend -name foo
ad_form -name foo -extend

ns_return 200 text/plain "fine"

This was fixed a half year ago or so in CVS and will be part of the next OpenACS release.

As always, please include version numbers in bug reports and report these on the bug tracker.