Hello zopistas, I have a ZPT page with user registration form in it. The form calls python script and if the user login is already in database I have to return previous filled form to change the user login. How can I implement this? addClientForm: <form action="addClient"> ... <input type="text" name="user.login:record"> ... </form> addClient script: if inDB(user.login): return context.addClientForm() - but this returns empty form return context.addClientForm(REQUEST) - this returns empty form too -- Best regards, alienoid mailto:alienoid@is.lg.ua
alienoid writes:
I have a ZPT page with user registration form in it. The form calls python script and if the user login is already in database I have to return previous filled form to change the user login. How can I implement this? The script returns a dictionary with the data to be used inside the form. If the user exists in the database, the dictionary is filled with the data from the database. Otherwise, it may be filled from the request or be empty (handle undefined keys in your template!).
Dieter
participants (2)
-
alienoid -
Dieter Maurer