Forum OpenACS Development: Re: OK button and workflow actions in the form builder ...

Collapse
Posted by Ola Hansson on
Right, I need to distinguish between the original action button click and the OK button click.

I tried the following - changes in bold - but it doesn't seem to work (this is actually from /lib/curriculum-ave.tcl):

...

# Set editable fields. Must do this after the "-form" block!
if { !$new_p && $wf_action_exists_p && ![form is_valid curriculum] } {

#    doc_return 200 text/plain "* [array get action] *"

    foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { 
	element set_properties curriculum $field -mode edit 
    }
}    

ad_form -extend -name curriculum -edit_request {

...
When I click the OK button is_valid is actually false ...

Thanks.

Collapse
Posted by Lars Pind on
is_valid has to be true at some point if you're submitting and there aren't any validation errors.

I'm not sure where ad_form actually creates the form, though.

Have you tried to move the code below ad_form?

/Lars