I am working with a basic Bootstrap form that is submitted using JavaScript. Upon clicking the submit button, the data is processed and the input values are reset without the need to reload the page:
if( json.success ) {
$('#form_sendemail').find('.form-control').val('');
}
The issue I am facing is that when there are autocompleted fields in the form (highlighted in yellow in Chrome), they remain highlighted even after the form is submitted and the fields are cleared. How can I remove these styles without refreshing the page? (changing the background-color
with !important
did not work).