[dev] Horde_Form submit variable action
Richard Wallace
rwallace at thewallacepack.net
Thu Jan 13 13:39:25 PST 2005
Quoting Chuck Hagenbuch <chuck at horde.org>:
> Quoting Richard Wallace <rwallace at thewallacepack.net>:
>
>> I've tried a number of things to workaround this, none of them
>> pretty. One was to create a custom action that extends the submit
>> action and provide it with the name of the form that should actually
>> be used. This doesn't work well, though, because I don't know when
>> constructing the form1 whether it is going to be the one rendered or
>> if the form2 is going to be rendered, so I run into a chicken and
>> egg problem.
>
> I think you need to keep it as one form, not two, and reload the form on
> choosing something from your dropdown. Look at PollForm in scry/edit.php, and
> how it uses the 'submit' action.
>
So rather than have multiple forms as whups does it I should use one form and
conditionally add sections after a step has been completed? I like that, it
should work pretty well. I can build the first part of the form, validate
that, then build the next section if the previous one validated and so on.
Very nice. Thanks.
Rich
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the dev
mailing list