[Zope-dev] Order of Form Keys in REQUEST

Max M maxm at mxm.dk
Wed Mar 10 04:04:56 EST 2004


Sandra Chong wrote:

 > How does Zope's REQUEST object decide what order to store the form keys?
 > I've got a form with fields in order a, b, c, d - but in REQUEST.form,
 > they're stored out of order.
 >
 > This is causing quite a big problem, as I'd like to dynamically 
output the
 > form values in order after the form has been submitted.

Dictionary keys are unordered.

You need to store the order of the keys somewhere else. Ie. to have a 
list in your form with the keys in order, Or to name them alphabetically 
and then sort the keys.


regards Max M



More information about the Zope-Dev mailing list