Dynamically add new input field


Hey, guys, I was thinking about adding input field with a plus button click on form i.e user presses the ‘+’ button and an input field appears (the user can have any no. of input fields).
Can anyone please suggest me how to do it??


refer this forum link…How to add text field dynamically

1 Like

Thanks Rupnesh, it did work but can you explain how can i send the input value of those forms to the backend??
Like if someone created 3 more input forms using the add button how can I catch and send those values to backend??

submitData() {
  let doc_name_txtvalues:any=[];
  let doc_add_txtvalues:any=[];
  let doc_cont_txtvalues:any=[];

  for(let i=0; i<=this. MySelect1.length;i++) {
  //pass the doc_name_txtvalues,doc_add_txtvalues,doc_cont_txtvalues to api.

  let dataarray:any=[];
  for(let i=0; i<=this. MySelect1.length;i++) {
  //pass the dataarray to api.

Will it work with pdfmake??
As i want the values to be printed on a pdf file.