Skip to content
Advertisement

PHP submit POST

I Created 2 forms and i’m trying to take all of the data and which inside them and email them both in a simple table, however i want that each form will have only 1 header and no matter how much data would be entered or on how many columns it has it will keep adding lines and not headers something like this: which has only 2 columns but can have 3 in the future:

enter image description here

So i Created this code to keep it generic as much as possible:

JavaScript

The forms being called by the following id=”Template_Picker” with a JS and creating submit button:

JavaScript

Forms looks like this:

JavaScript

Thanks In Advance.

Advertisement

Answer

As work today has been cancelled I had a spare 1/2 hour and put together a small demo using vanilla javascript and,I think, syntactically valid HTML markup that offers greater flexibility than the original as you can simply add new template tags ( with content ) and the javascript should accomodate them accordingly and generate the desired output. The comments throughout ought to help clarify what is going on where…

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement