Well, you could look at converting the form as Satchmo delivers it into a FormWizard ... Additionally, you could validate entries via Javascript (though I'm not sure that really solves your problem).
Personally, I wish there was more client-side validation before asking the server to validate forms. To really get what you're looking for, I think you may end up having to create two custom form pages, and a custom view that you send the billing data to, which checks the form is valid and then looks at the checkbox, if it is True, you move on to the payment step; if False, post form data to the shipping form. Keep in mind, if you haven't already look at the code and db, that what you are saving via these forms are entries in the AddressBook model/table, not the Contact table. You're saving addresses with a key to the contact instance. The same goes for the checkbox. If you take a look at the Contact model via the admin, you'll notice the AddressBook entries are available via inlines -- a nice tip-off that it's a separate model. Bob On Tue, Mar 3, 2009 at 11:17 AM, Kip Parker <[email protected]> wrote: > Yes, an excellent idea, but they want the billing and shipping address > entry pages to be two separate screens. > > That would be do-able in javascript in a similar way to your site, but I > wouldn't be able to validate the form until I had the second screen filled > in, so a bit of a flow problem if you make a mistake on the first screen and > have to go back. > > Ideally I would like to validate contact details in one process, then ask > for shipping details in another, and I haven't been able to work out > a graceful way of doing it. > > > On 3 Mar 2009, at 15:55, Bob Waycott wrote: > > Not sure what your exact needs are Kip, but have you considered adding a > bit of javascript to the page? > In our current shop, we are building that page out with a simple jQuery > show/hide that will load the page with the checkbox checked, and the > shipping form hidden -- if a user unchecks the box, indicating a different > shipping address, we'll just show the form. > > Nice and simple, not 15 minutes of extra work. > > Bob > > On Tue, Mar 3, 2009 at 6:02 AM, Kip Parker <[email protected]> wrote: > >> >> Hello, >> >> I need to have the contact details split into two stages, first the >> billing details then the "Click if the same" and shipping information >> part, and I am frankly a bit lost. It seems as if the contact info >> section comes before you get in to the payment module so a custom >> payment module isn't the answer, is that right? >> >> Not sure whether I should look at creating a custom contact_info view, >> try and do it with signals? A nudge in the right direction would be >> much appreciated. >> >> Kip. >> >> >> > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Satchmo users" 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/satchmo-users?hl=en -~----------~----~----~----~------~----~------~--~---
