Form data reset in <input /> tags
I have the following form:
I want the data that the user inputs in the "input" tag fields to reset when the user leaves the page or submits the form. How do i do that?
I want the data that the user inputs in the "input" tag fields to reset when the user leaves the page or submits the form. How do i do that?
<form @submit.prevent="purchase">
<div class="input-wrapper">
<input class="form-headline" :value="'Price: ' + paymentStore.price + ' $'" disabled />
</div>
<div class="input-wrapper">
<input class="form-headline" :value="'Sessions number: ' + paymentStore.sessionsNum"
disabled />
</div>
<div class="input-wrapper">
<input class="input-value" placeholder="0000 0000 0000 0000" />
</div>
<div class="inputs-in-line">
<div class="input-wrapper">
<input class="input-value" placeholder="12/12" />
</div>
<div class="input-wrapper">
<input class="input-value" placeholder="000" />
</div>
</div>
<button class="cta-button">Pay</button>
</form> <form @submit.prevent="purchase">
<div class="input-wrapper">
<input class="form-headline" :value="'Price: ' + paymentStore.price + ' $'" disabled />
</div>
<div class="input-wrapper">
<input class="form-headline" :value="'Sessions number: ' + paymentStore.sessionsNum"
disabled />
</div>
<div class="input-wrapper">
<input class="input-value" placeholder="0000 0000 0000 0000" />
</div>
<div class="inputs-in-line">
<div class="input-wrapper">
<input class="input-value" placeholder="12/12" />
</div>
<div class="input-wrapper">
<input class="input-value" placeholder="000" />
</div>
</div>
<button class="cta-button">Pay</button>
</form>