views:

144

answers:

2

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 to be able to completely remove the field through jQuery in order to validate correctly.

+1  A: 

You can remove the element first before submitting it.

$(this.element).remove();
nolabel
A: 

You can also not set the name attribute, and the field won't get posted

Matt