durusmail: quixote-users: some form2 enhancement proposals
some form2 enhancement proposals
2004-10-01
some form2 enhancement proposals
Neil Schemenauer
2004-10-07
Hi Stefan,

> I would like to make it possible to create forms that _don't_ listen
> to the POST data, e.g. I receive form input, store some data to a
> database, read some new data from a database and display a new form
> with new values, but the widget's names are often identical to the
> ones used for the POST data. If I don't make the new form 'deaf', they
> POST data interferes with my new values. Other uses include several
> forms on one page, where you only want one of them to react to user
> input.

I have to think about this one a bit.  If all your widgets are
parsed then you could call request.form.clear() to prevent you new
value from being clobbered.

> *** a set_title() method:
>
> Is there a reason why the set_title() method is missing? If not, I
> propose there should be one.

David added this.

> *** localisation:
>
> I think for us international users it would be nice if strings that
> show up in the user interface were not hardcoded into the source code,

That's a worthy goal.  Perhaps we need something like gettext.

> *** double escape trouble

> htmltag() calls _escape_string() on its attributes, so if
> value was already htmlescape()'d it now gets escaped a second time.

Good eye.  htmltag() should use htmlescape() not _escape_string().

  Neil

reply