Hello,

I try to offer my users an edit form on an ordinary object, but i
don't want them to modify some fields. These TextField are displayed
for information purpose, but disabled=True. From this point, it's just
impossible to validate the form (Missing Value even without any
validator). I read on old posts, that the browser doesn't send
disabled input data, so the error_handler cannot retrieve the data and
can't display them in case of error.

The workaround that i'm not particulary proud, is to manually print
hidden input with the correct name/value and to manually put a fake
input without name (for visual purpose) with a preceding <py:if
test="field.disabled">.

In the future, have you ever envisage to put the data in session and
to retrieve it when using the validate and the error_handler, the
possibility to redirecto the initial method considering that it is
retrieving missing data part in the case of an edit form and
table_form.html manage error display.

I read the old post where you talked about the ASP.NET way, the HMAC,
etc. I know that cakephp has also a solution. I wanted to know, if
there was already a designed solution or a best practice or anything
else. Excuse me if i miss something.

Best regards,
-- 
"Par trois méthodes, nous pouvons apprendre la sagesse : d'abord, par
la réflexion qui est la plus noble; en second lieu, par l'imitation,
qui est la plus facile; et la troisiéme, par l'experience, qui est la
plus amère." Confucius

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to