The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
multiple submissions with one form - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: multiple submissions with one form (/showthread.php?tid=629)



multiple submissions with one form - Hannes - Apr 2nd, 2010

Is it possible to send multiple submission with one button push?

For example form fields
name1 address1 phone1
name2 address2 phone2
name3 address3 phone3
to add multiple contacts with one form that are put into database as separate entries.

best regards, Hannes.


RE: multiple submissions with one form - Ben - Apr 4th, 2010

Hi Hannes,

There's nothing "out the box" that would let you do this, but it can certainly be done with a little PHP.

Basically what you'd do is still store all those fields in a single form, then on form submission separate them out and create multiple entries. But note: this would require some PHP knowledge (and some spare time!) Smile

- Ben


RE: multiple submissions with one form - cofty - Apr 14th, 2010

Hi, just bumping this in case anybody has time to give me some clues on how to go about this.

I am a junior football league secretary and used the previous version of form tools last season very successfully for player registration. I had the form redirect straight back to the form so club secretaries could enter players names and dates of birth one at a time quite quickly.

It would be really useful if they could enter a batch at a time though.

I love a challenge, if anybody could describe how to do what Ben said above that would be great.

Thanks


RE: multiple submissions with one form - victorycck - Nov 7th, 2010

This is something I have done successfully BUT not in formtools. The key lies in designing your sql statement to capture the data you want and then breaking this data up in the rows you want eg

$SQL = sprintf("INSERT INTO $your_table (name, `address`, `phone') VALUES
(name1,address1,phone1),
(name2,address2,phone2),
(name3,address3,phone3)");

The problem is, I have looked in API codes in formtools and can't figure out where to place the mysql statement. Any help will greatly be needed especially with where to place the sql in the API. over to you ben
There are situations where this is needed. especially if one would want to submit many rows of data with one click. This would save some time for the user. I store the data up in one form then break it up on insertion by writing sql in this format

$SQL = sprintf("INSERT INTO $your_table (name, `address`, `phone') VALUES
(name1,address1,phone1),
(name2,address2,phone2),
(name3,address3,phone3)");

The problem is, I have looked in the API codes in formtools and can't figure out where to place the mysql statement. Any help will greatly be needed especially with where to place the sql in the API. over to you ben

This would do a lot of good if the form is recognised in the form list page

Thanks

(Apr 4th, 2010, 12:01 PM)Ben Wrote: Hi Hannes,

There's nothing "out the box" that would let you do this, but it can certainly be done with a little PHP.

Basically what you'd do is still store all those fields in a single form, then on form submission separate them out and create multiple entries. But note: this would require some PHP knowledge (and some spare time!) Smile

- Ben



RE: multiple submissions with one form - Ben - Nov 9th, 2010

Hey guys,

Sorry for not responding sooner.

Interesting... unfortunately it's not possible yet with the API. Victorycck is quite right in that you just need to doctor the SQL insert statement, but there's a quite a lot to consider when making this into a generic feature to be used by any form.

I'm afraid I'll have to give this some more thought when I have more time.

Apologies!

- Ben


RE: multiple submissions with one form - Hannes - Nov 26th, 2010

Hey Kelly,

Quote:Great post! It's very nice. Thank you so much for your post.
did you find a solution or are you working on it?

Cheers,
Hannes


RE: multiple submissions with one form - victorycck - Dec 12th, 2010

I would love to be a part of the team that will work on re-developing the API to accommodate multiple row submissions at a click of a button.

I really love the simplicity with which you wrote formtools and would love to study it further

Thanks

(Nov 9th, 2010, 8:53 PM)Ben Wrote: Hey guys,

Sorry for not responding sooner.

Interesting... unfortunately it's not possible yet with the API. Victorycck is quite right in that you just need to doctor the SQL insert statement, but there's a quite a lot to consider when making this into a generic feature to be used by any form.

I'm afraid I'll have to give this some more thought when I have more time.

Apologies!

- Ben