[development] E-Commerce formapi question.
Karoly Negyesi
karoly at negyesi.net
Thu Feb 16 09:24:34 UTC 2006
>> complex multi-part forms in any 4.7 module, so we're going to need
>> help from the biggest formAPI gurus around.
I think we have a new solution for multipart.
I spent an ungodly amount of time with the (seemingly simple) problem:
removing $_POST from poll. I have written at least three different
solutions with input from Adrian and webchick (I love live coding runs).
None of them cut it.
The current solution is, which I think is very clean (and Adrian shares
this): call form_builder from poll_form. The patch is already in the queue
and if Dries also thinks so, it'll be in core.
http://drupal.org/files/issues/poll_post.patch
You could do the same. Create a hidden element which tells you which stage
you were at. Define the buttons in advance as well. Use #weight and #theme
to move these elements to where they should be visible. Call form_builder
on the elements. Now you have #value. Based on it, you can make decisions
about which form you want to define.
Regards
Karoly Negyesi
More information about the development
mailing list