1

I want to have a bunch of PayPal "Subscribe" buttons inside of a table, like so:

Each of those buttons looks something like this:

<td>
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
        <input type="hidden" name="hosted_button_id" value="XXXXXXXXXX">
        <input type="hidden" name="custom" value="52">
        <input type="hidden" name="notify_url" value="http://localhost:81/api/paypal_ipn.php">        
        <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    </form>
</td>

But when I inspect the button in Chrome's developer toolbar I see that the <form> has been removed! In fact, it's been moved to wrap the entire table.

This is problematic because each of those buttons has different parameters I need to submit. I can't have the form wrap the whole table or all my hiddens will get submitted with it.

How can I work around this so that I can have my buttons laid out inside the table and each submit different parameters?

Community
  • 1
  • 1
mpen
  • 237,624
  • 230
  • 766
  • 1,119

1 Answers1

2

Im getting it right, may be you forgot to close some tags?

sajay
  • 255
  • 1
  • 2
  • 10
  • Woops...I had another form that wrapped most of the page. The problem was that you can't put a form in a form, but a form in a td seems to be OK :-) Thanks. – mpen Jun 01 '13 at 05:34