template::form::generate (private)

 template::form::generate id [ style ]

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

Render the finished HTML output for a dynamic form.

Parameters:
id (required)
The form identifier
style (optional)
The style template to use when generating the form. Form style templates must be placed in the forms subdirectory of the ATS resources directory.
Returns:
A string containing the HTML for the body of the form.

Partial Call Graph (max 5 caller/called nodes):
%3 template::adp_compile template::adp_compile (public) template::adp_eval template::adp_eval (public) template::adp_level template::adp_level (public) template::form::template template::form::template (private) template::form::generate template::form::generate template::form::generate->template::adp_compile template::form::generate->template::adp_eval template::form::generate->template::adp_level template::form::generate->template::form::template

Testcases:
No testcase defined.
Source code:
    set __adp_output [template $id $style]

    set level [template::adp_level]

    # compile the template
    set code [template::adp_compile -string $__adp_output]

    # these variables are expected by the formwidget and formgroup tags
    set form:id $id
    upvar #$level $id:elements $id:elements formerror formerror $id:properties form_properties

    foreach element_ref [set $id:elements] {
        # get a reference by element ID for formwidget and formgroup tags
        upvar #$level $element_ref $element_ref
    }

    # evaluate the code and return the rendered HTML for the form
    return [template::adp_eval code]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: