Forums

Add Another Row

insightcreative 28 Mar, 2014
Hi

I'm setting up a simple order form for people to order some garments.

Each form will have a row with:

Colour | Text | Size | Embroidery Colour... etc

What I'd like to do is have a button so that it starts with 1 row and then when the click on the button it adds another row until they're done and click submit.

Is this doable 'out of the box'?

Best regards
Andy
insightcreative 28 Mar, 2014
Hi Bob

Thanks for that. That all makes sense up to a point🙂

Note that in this code substr(7, 1); is used to get the number from the end of the Add One button id. That is addone_3 gives 3. If the maximum is more than 9 then some adjustment will be needed for example



var id = event.target.id.replace('addone_', '');



I want the user to be able to enter up to 50 lines.

Also, I just want the contents e-mailed to me and it says:

The resulting data is returned as a sub array in $form->data['recipient'] and may need further processing before it can be saved or used in an email.



I'm not daft, but I'm not a programmer either! Is it fairly easy to just get the form contents e-mailed to me like any other form?

Best regards
Andy
GreyHead 31 Mar, 2014
Hi Andy,

It should be straight-forward. If you want to have 50 records then you will need to use a two digit serial number to distinguish them e.g. 00-49 and so you have to adjust the JavaScript to grab the last two characters.

The layout in the email really depends on your needs. It can all be in one big table if you like, or, if your coding skills are up to it you can sort/group the results and/or skip any empty ones.

Bob
This topic is locked and no more replies can be posted.