Hi, On 12/3/06, GvaderTh <[EMAIL PROTECTED]> wrote: > > Hello All. I read django documentation about forms, had seek internet > and didn't found solution for situation like this: I have order form > divided to 3 steeps, after every step should be validation and if > validation is succesfull, user can fill form for next-step. Form for > every step doesn't map to database table, or object, I think that only > filled succesfully 3 step, the result will be a new object. What is the > best way to do this? At the beggining I thought that after every step, > value after validation I will hold in session and at the end I made > final object. But for now I don't know how to write template for this > task, and how to do validation for this. Any help? Please > Thanks > G. >
Since the first two forms doesn't map to a database object, you will need to create custom forms and manipulators. Take a look at: http://www.djangoproject.com/documentation/forms/#custom-forms-and-manipulators Although, the way to create and use custom forms is going to change soon. Just be aware of that. You can create three views, one for each step. In the first view, create a custom manipulator to handle and validate the data that is entered in that first view. If the data is correct, use sessions to store a flag that indicates that the user has entered the information correctly and redirect him to the next view. In the next view you would then check in the session that the flag for the previous view is set. If you will later need the supplied information then store it in the session too, do not use hidden fields to carry it over different views. Sessions documentation: http://www.djangoproject.com/documentation/sessions/ Regards, Jorge --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---