Forum OpenACS Development: Response to ad_form again

Collapse
2: Response to ad_form again (response to 1)
Posted by Dave Bauer on
Ola,

That doesn't work.

Try this:

if {$some_condition_p} {
     ad_form -extend -name formname -form {
            {test:text(text) {value {This is a test}} }
     }
} else {
     ad_form -extend -name formname -form {
          {test:text(inform) {value {This is a test}} }
     }
}

or some variation on that theme. The idea is to build up the form using -extend. You can't pass in a variable as the value of -form {}.
Collapse
Posted by Jade Rubick on
There is a workaround that lets you substitute a variable into the ad_form declaration. Use [set variablename].