In a response in the SOEN
They pass an approach of temporarily disabling the fields:
Example:
var myform = $('#myform');
// Encontra os elementos e remove o atributo disable
var disabled = myform.find(':input:disabled').removeAttr('disabled');
// serialize o form
var serialized = myform.serialize();
// coloca todos os elementos que foram desabilidados disable
disabled.attr('disabled','disabled');
Is there a more efficient way to serialize()
in form fields that are disabled?