Actually I'm using Boostrap 4 and I want to reset all the inputs inside my form via JS with the function below. All text inputs are reseted correctly but the radio buttons group and checkboxes do not get deselected.
$('#new_customer')
.find(':input')
.not(':button, :submit, :reset, :hidden')
.val('')
.removeAttr('checked')
.removeAttr('selected');
};
I know the original inputs are hidden and styles are build using ::before
and ::after
pseudo-elements. But in the documentation I do not see a possible way to reset those controls. How do I achieve this?