Apologies if my english is not appropriate. I need to send three images and comments under the same username. The form is as follows:
Name: _______
img1: comment1 ___: ____
img2: comment2 ___: ____
img3: comment3 ___: ____
The problem is that I inserted all in the same column in the database. :
name | img1 | img2 | img3 | comment1 | comment2 | comment3
Need to be inserted into my database as follows:
Name | img1 | comment1
Name | img2 | comment2
Name | img3 | comment3
Thank you for your help
Name: _______
img1: comment1 ___: ____
img2: comment2 ___: ____
img3: comment3 ___: ____
The problem is that I inserted all in the same column in the database. :
name | img1 | img2 | img3 | comment1 | comment2 | comment3
Need to be inserted into my database as follows:
Name | img1 | comment1
Name | img2 | comment2
Name | img3 | comment3
Thank you for your help
You need to enable the "save multiple" setting in the "db save" action, and your fields names should be in array format, you should NOT have a "handle arrays" action before the "db save".
If you only have 1 name field then you will need to prepare the data array with the data array to be saved, you also better use a "Model id" and set the "db save" to save data under the model id, in this case your fields names should use the model id.
example fields name:
Regards,
Max
If you only have 1 name field then you will need to prepare the data array with the data array to be saved, you also better use a "Model id" and set the "db save" to save data under the model id, in this case your fields names should use the model id.
example fields name:
Model[img][1]
Model[comment][1]
Model[name][1]
Regards,
Max
This topic is locked and no more replies can be posted.