Jerry,

ACS (or aD) did develop an always forward solution.
Here is my local copy:
http://multi.zmbh.com:8500/doc/acs-templating/api/form.html

Unfortunately it is so poorly documented that you end up having to read
the
tcl source to figure out what you can do with it.

Essentially the solution is to post back to the form page. You can then
check if the form is valid. Invalid fields get marked and the others are
filled in with the submitted data.

Here is a sample:

example.tcl:

ad_page_contract {dummy} -properties {}

template::form create elem

if {[template::form is_valid domain_form]} {

        #Process Form
        return -code return
        # Work around bug where template is always parsed
        ad_return_template blank.adp
}

# Else gen the form showing error:

set values 3
template::element create  elem mydata   \
                -label "Favorite Food:" \
                -datatype text          \
                -widget select          \
                -values $values         \
                -name food              \
                -options  {
                   {"Banana" 1}
                   {"Beef"   2}
                   {"Popcorn" 3}
                 }

template::element create elem story \
                -label "Story:" \
                -datatype texa -widget textarea \
                -html {wrap virtual} \
                -link "<a href=email?domain_id=$domain_id>Email</a>" \


--Tom Jackson

Reply via email to