Needs work
Project:
Ajax
Version:
6.x-1.9
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2011 at 15:16 UTC
Updated:
21 Jan 2012 at 08:38 UTC
Hi,
Not sure if what I expected is currently a feature but I thought a form would be cleared upon succesful submission but this doesn't happen in my case. (tested in various browsers)
Is there a way to achieve this functionality?!
Cheers
Comments
Comment #1
bartezz commentedFixed with this code
Comment #2
Sjarsena commentedWhere do I place this code?
Comment #3
bartezz commentedFor instance in the .js file of your theme...
Could also make a custom module but that's a bit ovber the top...
Cheers
Comment #4
gebranbs commentedgoto modules/ajax/ajax.js Drupal.Ajax.go funtion and add the below on success state
$(':input','#'+formObj.attr('id')).not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected');
Comment #5
bartezz commentedNever hack core or contributed modules! All changes are lost in updates. Add to custom theme .js file or write a custom module to add my code.
Cheers
Comment #6
brendoncrawford commented