Ok, sense I don't know what the function pd() does, I have inserted an alert() command in the pd() function that will alert the id and name of that input element.
This way you will be able to see the results of the existing input elements and the new ones that were added, using the insert button.
And for testing purposes, I added some PHP code to the top of the PHP so you can see the contents of the $_POST array when either of the forms are submitted.