I have created data entry form using Drupal 8 Webform (Yaml forms), Part of the form is table field which hosts dynamically generted textfields using jquery shown below:
$(document).ready(function(){ var input=""; var column=""; $(".add-row").click(function(){ var new_row =jQuery('<tr>'); input= jQuery('<input>').attr({type: 'text',name:'names[]'}); column=jQuery('<td>').append(input); input= jQuery('<input>').attr({type: 'text',email:'emails[]'}); column=jQuery('<td>').append(input); new_row.append(column); $("table tbody").append(new_row); }); });
However, to my surprise when I hit submit button of the form all other fields are submitted except the fields which have been generated dynamically on the table field.It seems Drupal 8 can not recognize the dynamically generated input fields
So my question how can I make Drupal 8 recognize my dynamically generated input fields. I want to see the data in these fields in the database. Please help. Your assistance will be greatly appreciated