user187680
user187680

Reputation: 673

Two Forms One Submission

My site has three columns. I have two fields within a form that need to be in the left column and 1 field of what is currently a different form that needs to be in the middle column. The thing is, I want them to behave as one form... (or be one form if that is possible).

When The form is submitted, the data from all the fields, needs to be passed to the action page.

What is the best way of achieving this? h

Upvotes: 1

Views: 62

Answers (3)

Arnaud Le Blanc
Arnaud Le Blanc

Reputation: 99921

If you don't have to support old browsers, you can use the form attribute on some elements to make them behave like they are in the form.

See http://www.impressivewebs.com/html5-form-attribute/

<form id="some_form">
 ...
</form>

<input form="some_form" />

Else, the better way is to make the form element a parent of all fields. Just move the form element out of the first column.

Upvotes: 4

Lowkase
Lowkase

Reputation: 5699

Columns do not a form make. Wrap all of your column divs in one form tag.

Upvotes: 2

James Hill
James Hill

Reputation: 61822

It sounds like you control the code. The simplest solution is to make a single form. What you're looking for is non-standard functionality and whatever solution you settle on my cause problems in the future.

Upvotes: 1

Related Questions