When I submit a form by jQuery, like this: jQuery('#myForm').submit();
I don’t want send some information in a specified div inside that form (I mean all input fields, select elements, textarea elements, etc are not allowed to sent to server), but I don’t know to to prevent that div from submitting along with the owner form.
Could you please help me on this? Thank you so much.
Thank you all for your quickly replies. I tried to set “disabled” attribute to all input fields in that div to false, but when I checked it again on server, some other fields (such as select, textarea) were still submitted. I think I should disable them too. Is there any way to remove or “hidden/disable” the whole div without disabling each kind of input elements?
something like this should do it: