You are not logged in Log in Join
You are here: Home » Members » infrae » Formulator » Formulator HOWTO » It doesn't seem to work in a python product

Log in
Name

Password

 

Comment

Above in this comment thread: Formulator HOWTO »

Comment

Discussion icon It doesn't seem to work in a python product

Posted by: jmeile at 2006-10-04

I found that somehow this howto is either outdated or only works for dtml.

If you scan the request after submiting a form in a python method, then you will find that Formulator stores: field_animal and not animal as the HowTo says.

Comment

Discussion icon 1159979857

Posted by: jmeile at 2006-10-04
Comment

Discussion icon This should be clarified

Posted by: jmeile at 2006-10-05

Ok, now I got it. I guess when working with this in dtml, if there are no errors, then the field values will be stored again in the request. So, when you say , you are adquiring it from the request. In python you have to assign the result of the validation to a variable like this:

fieldValues = form.validate_all_to_request(REQUEST)

Then if there is no error, fieldValues will contain a dictionary with the fields' real names and its values.