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!)
- Ben