bootstrap modal clear all fields

To clear all fields in a Bootstrap modal, you can use JavaScript to reset the values of the input fields. Here's an example code snippet:

// Get the modal element
var modal = document.getElementById('myModal');

// Get all input elements within the modal
var inputs = modal.getElementsByTagName('input');

// Loop through the input elements and reset their values
for (var i = 0; i < inputs.length; i++) {
  inputs[i].value = '';
}

In this code, we first get the modal element using its ID. Then, we use the getElementsByTagName method to get all the input elements within the modal. Finally, we loop through the input elements and set their values to an empty string, effectively clearing the fields.

Make sure to replace 'myModal' with the actual ID of your modal element.

I hope this helps!