- Joined
- Aug 16, 2022
- Messages
- 52
- Reaction score
- 2
Hi Everybody,
I've built a New-Registration form that will ask a visitor to input their password PW1 and then confirm that password in a second <input type ="password"> PW2.
Once the visitor enters the confirmation, I would want my system to automatically/immediatley verify if PW1 is equal to PW2, or not.
I've built a New-Registration form that will ask a visitor to input their password PW1 and then confirm that password in a second <input type ="password"> PW2.
Once the visitor enters the confirmation, I would want my system to automatically/immediatley verify if PW1 is equal to PW2, or not.
- If the two are equal, then I want to store one of the results in a third password variable and move on with the rest of the form.
- If the two submissions are NOT equal, then I want to clear the contents of both PW1 and PW2 and then place the cursor back in the PW1 Input-field.
HTML:
<div class="row">
<div class="col-sm-6 form-group">
<div class="input-group">
<span class="input-group-text"><i class="bi-key-fill" arial-hidden="true"></i> </span>
<input type="password" class="form-control" placeholder="Enter Your Password" id="PW1" name="PW1" required="required">
</div>
</div>
<div class="col-sm-6 form-group">
<div class="input-group">
<span class="input-group-text"><i class="bi-key-fill" arial-hidden="true"></i> </span>
<input type="password" class="form-control" placeholder="Enter Your Password Again to Confirm" id="PW2" name="PW2" required="required"><br>
</div>
</div>
</div>
<!--Insert a script to evaluate "what to do" if PW1 is equal/unequal to PW2-->
<script>
I have no idea how to plan or execute this snippet
</script>
<br>