I want to get the value of text fields from a dynamically created form and save it in the database. The number of text fields is not fixed. The form is inside the template.
<template name="product"> <input type="text" id="txt1"> <input type="text" id="txt2"> ....... ....... <button id="CreateNewProduct">Create new product</button> </template>
I want to insert text box values into the product collection. I just showed two text fields here for reference. It can be 3,4,5, ...... up to n numbers. It may also contain a flag and a radio.
Can you suggest me how to do this?
source share