I'm trying to remove a form element generated through Ajax calls, but when I submit the form and var_dump the POST request, I can still see the form field key=>value. I need t开发者_开发百科o be able to completely remove the field through jQuery in order to validate correctly.
You can remove the element first before submitting it.
$(this.element).remove();
You can also not set the name attribute, and the field won't get posted
精彩评论