so if i disable the redirect on a form the following is called and it resets the values in the form fields, although it submits the form correctly. not sure i understand why its doing this.

args.local.form[0].reset();

Comments

mustanggb’s picture

I am seeing this also
With redirect disabled forms are reset to their previous unedited value
And dropdowns get reset to the first entry, even if it is not the old or new value

mustanggb’s picture

Category: support » bug
theshanergy’s picture

Is there any word on this? I'm experiencing the same issue with 6.x-1.14.

hongpong’s picture

Are there any other tickets on this? Definitely an issue.

hongpong’s picture

by disabling the reset statement, the form did behave as expected with its values. Other issues with tokens cause other AJAX form save issues, however disabling the line does help with the browser's local form values.

Drupal.Ajax.plugins.disable_redirect = function(hook, args) {
if (hook === 'redirect') {
if (args.options.disable_redirect === true) {
//args.local.form[0].reset();
//IE
$('.form-item select', args.local.form[0]).attr('selectedIndex', 0);
if (args.options.remove_form === true) {
args.local.form.remove();
}
else {
$('.form-item :input', args.local.form[0])[0].focus();
}
return false;
}
}
}

brendoncrawford’s picture

Status: Active » Needs work