[Zope] REQUEST.form variables order

Tino Wildenhain tino at wildenhain.de
Mon Oct 24 09:27:41 EDT 2005


Krzysztof Kubacki schrieb:
>>>On 24 Oct 2005, at 14:03, Krzysztof Kubacki wrote:
>>>
>>>>>How to change it?
>>>>>I would like to have variables in the same order as I put them into
>>>>>internet form.
>>>>>
>>>>
>>>>You can't. REQUEST.form is a dictionary. They are, by definition,
>>>>unordered.
>>>>
>>>>Why do you need them ordered? What is the use case?
>>>>
>>>
>>>In my "Send script" I collect all data from internet form and send
>>>to email.
>>>I want to have that data in the email in the same order it was
>>>placed in the
>>>internet form.
>>
>>Please keep this on the list!
>>
>>You'll have to add code to your script to order the form items yourself.
>>
> 
>  But the thing is that I don't have guarantee that user will not replace
> fields in the internet form(there is a possibility).

And how exactly would that help if your script isnt expecting the new
fields anyway?

I'd use the :list and :records modifier accordingly for keeping
ordering where that matters.

HTH
Tino


More information about the Zope mailing list