I have check box which will be dynamically added along with the textfields.
<input type="checkbox" name="namechkbox[]">
<input type="text" name="nametxt[]">
I will need to map the checkbox value with the text field. I found from other questions that after adding the hidden element over the input element checkbox.
<input type="hidden" name=namechkbox[]" value=0>
Since it's dynamic, it will add the index because of name[] in the name.
What is the way to handle checkbox with value submit for the dynamic elements?