Converts every variable specified in args into a form variable array suitable for use with ad_page_contract.
Call this function within a form to export the variables. It can be used safely with export_form_vars
Example:
set user_id [ad_verify_and_get_user_id]
set password "hahaha"
set user_name [db_string name_get {
set count 0
set hidden ""
foreach var $args {
upvar 1 $var value
if { [info exists value] } {
append hidden "
"
incr count
}
}
return $hidden
}]
set page_content "
This page
<form method=GET action=contract-test.tcl>
[export_form_vars user_name]
[ad_export_dynamic_form_vars user_id password]
<input type=submit>
</form>
"
doc_return 200 text/html $page_content
Switches:
-array (defaults to "dynamic_vars") - The name of the form variable array to be created. You need to use this name on the page receiving
the input from the form.