[development] E-Commerce formapi question.

Gordon Heydon gordon at heydon.com.au
Mon Feb 6 23:26:35 UTC 2006


As of late I and a few others have been doing a lot of work on the
upgrade to E-Commerce to Drupal 4.7.

One part does have me stumped in that I am not sure how I am going to do
the checkout process. So far I have fudged it in that I am not using the
_validate() and _submit() formapi hooks.

Basically what happens in this process is that the user is sent to
cart/checkout where the first form is created. This is then posted back
and then if all goes well the second form is rendered, and so forth.

Now because of the way that the formapi works in that it renders the
form and then the _validate() and _submit are called. This means that by
the time I know that everything is OK it is too late to create the next

One idea I did have is that I could to a drupal_goto() to start again,
but this is quite and expensive operation when I am already there.

Of the formapi gurus are there any ideas on how I can get around this.

Any ideas would be much appreciated.

Thanks in advance.

More information about the development mailing list