W3C home > Mailing lists > Public > www-html@w3.org > February 2004

RE: Multiple actions for forms

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Wed, 4 Feb 2004 10:20:48 -0000
To: "'Jason Henning'" <bb@thehennings.com>
Cc: <www-html@w3.org>
Message-ID: <008901c3eb08$8f1e9e00$6b01a8c0@W100>

Jason,

> It would be nice if forms could have more than one action.

That's one of the justifications for XForms [1]. The following snippet
would present to your servers exactly the data you had in your sample,
in other words, no modifications would be required to the server code
(the XForms namespace has been removed):

  <model>
    <submission id="subPayAtPickUp" action="send_order.php"
method="form-data-post" />
    <submission id="subSendOrderToPayPal" action="http://paypal.com"
method="form-data-post" />
  </model>

  <input ref="name">
    <label>Your Name</label>
  </input>

  <input ref="eaddy">
    <label>Your email address</label>
  </input>

  <input ref="phone">
    <label>Your phone number</label>
  </input>

  <submit submission="subPayAtPickUp">
    <label>Pay at pick up</label>
  </submit>

  <submit submission="subSendOrderToPayPal">
    <label>Send order to PayPal</label>
  </submit>

Obviously it would be more preferable to transmit XML data, so if the
servers could handle that, your submission elements would look like this
(i.e., 'post' instead of 'form-data-post'):

    <submission id="subPayAtPickUp" action="send_order.php"
method="post" />
    <submission id="subSendOrderToPayPal" action="http://paypal.com"
method="post" />


Regards,

Mark

[1] <http://www.w3.org/MarkUp/Forms/>


Mark Birbeck
CEO and CTO
x-port.net Ltd.

Download our 100% compliant
XForms processor from
http://www.formsPlayer.com/
Received on Wednesday, 4 February 2004 05:21:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:19:04 UTC