I am trying to get the add/remove row for a table which has multiple input fields in a row. I am able to get the cloning and removing of row.
What I need is to have the unique id name for each cloned input box. in the default row, input fields already has ids so cloned input should have the sequel of existing ids.
For example: default id names are firstname1 and lastname1 second row input field should have firstname2 ans lastname2 respectively.
And when a row is removed, row ids should be reordered. For example if I remove 5th row , then 6th row ids should get changed to firstname5 and lastname5