Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to send multiple forms together?

Featured Replies

Hi, please help me.

I have a few forms and I need send there forms by one submit input.

 

for example

 

<form>

<input type="text" value="1" name="id" id="id" />

</form>

 

<form>

<input type="text" value="2" name="id" id="id" />

</form>

 

<form>

<input type="text" value="3" name="id" id="id" />

</form>

 

and this i need send by one submit input.

 

Thx

You can't do that. A submit button will only send the data for its form.

And you should not have elements with the same id field.

 

<form>
<input type="text" value="1" name="id1" id="id1" />

<input type="text" value="2" name="id2" id="id2" />

<input type="text" value="3" name="id3" id="id3" />
</form>

 

Try something like this.

  • Author

I have only this ID :/

 

I(probably) need some javascript, but I dont know how write it :/

 

When I have id1,id2 I dont wrote this ;) but thanks

I'm not sure if you can even use javascript to trigger all the forms. As soon as the first one is triggered the page will process.

And it's bad for accessibility to rely on javascript.

 

 

Can you explain what you're trying to do. Why do you have many forms you need to submit at the same time?

I got a feeling there's a better way.

you can use javascript to trigger all the forms. Create a button that calls a javascript function. then in that function do

 

 

function submitform()
{
 document.form1.submit();
 document.form2.submit();
}

 

that MIGHT work but you really shouldn't be submitting many forms. what do you mean you only have this id?

you can use javascript to trigger all the forms. Create a button that calls a javascript function. then in that function do

 

 

function submitform()
{
  document.form1.submit();
  document.form2.submit();
}

 

that MIGHT work but you really shouldn't be submitting many forms. what do you mean you only have this id?

I'm just thinking that you might actualy just get the results from the first form...

most likely but if it can be done then that's how. I still can't think of a single reason for having many forms like that. The only point of seperate forms is seperate submissions.

you could ajax-submit the forms...

 

however, I really can't see any justifiable reason to have it split into 3 forms... explain what led you to this soluton?

Also, IF all the form where submitted, the elements with the same ID would override each other. So the solution doesn't make sense.

 

We need to know what you're trying to accomplish here.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.