I have a form in WordPress that has a dynamically generated text box so the user can enter multiple text boxes. This works fine but if the user presses the save/update button multiple times it is saving multiples of the same data from these generated text boxes.
I tried a JavaScript solution to disable the button once pressed which works, my data saves correctly from the generated text boxes but then if it is a new post only it ever saves as a draft.
Is there a solution?
Instead of using disable on the
#publishbutton,.hide();worked instead.