[Zope] REQUEST.form variables order

Krzysztof Kubacki krzysztof.kubacki at bmpg.pl
Wed Oct 26 08:48:06 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.


The thing is that there is possibility to change fields order by the mean of
WYSIWYG editor by the user. If he change order I would expect to get the
same order in REQUEST object.

Regards
Krzychu






More information about the Zope mailing list