template::form::is_valid (public)

 template::form::is_valid id

Defined in packages/acs-templating/tcl/form-procs.tcl

Return true if submission in progress and submission was valid. Typically used to conditionally execute DML and redirect to the next page, as opposed to returning the form back to the user to report validation errors.

Parameters:
id (required)
The form identifier
Returns:
1 if id is the form identifier of a valid submission or 0 otherwise

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_widget_file template_widget_file (test acs-templating) template::form::is_valid template::form::is_valid test_template_widget_file->template::form::is_valid template::adp_level template::adp_level (public) template::form::is_valid->template::adp_level

Testcases:
template_widget_file
Source code:
    upvar #[template::adp_level$id:submission submission $id:error formerror

    if { ! $submission } {
        return 0
    }

    if { [info exists formerror] } {
    # errors exist in the form so it is not valid
        return 0
    } else {
    # no errors exist in the form, submission approved
        return 1
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: