bbzzzzt wrong, can use button, I was thinking of form vs div

This commit is contained in:
Robert McGovern 2022-10-20 00:11:59 +01:00
parent 060056e793
commit 405cb41098
2 changed files with 5 additions and 5 deletions

View File

@ -53,11 +53,11 @@
</p>
<div class="email-form" id="email-form" action="submit" novalidate>
<label class="visually-hidden" for="email">Email</label>
<input class="email-form__input" placeholder="Email Address" type="email" name="email" id="email" required>
<!-- <button class="email-form__button-submit" type="submit"><img src="images/icon-arrow.svg" alt="Submit Button"> -->
<!-- </button> -->
<input class="email-form__input" placeholder="Email Address" type="email" name="email-input" id="email-input"
required>
<img class="email-form__error-icon" id="error-icon" src="images/icon-error.svg" alt="Error icon">
<img id="submit-button" class="email-form__button-submit" src="images/icon-arrow.svg" alt="Submit Button">
<button id="submit-button" class="email-form__button-submit" type="submit"><img src="images/icon-arrow.svg"
alt="Submit Button">
</div>
<p class="email-form__error-message error-hidden" id="errorMessage">Please provide a valid email</p>
</section>

View File

@ -23,7 +23,7 @@
const validEmailFormat = /^[A-Za-z0-9][\w\+]*@[A-Za-z0-9]{3,}\.[A-Za-z]{2,}$/i;
const emailForm = document.getElementById("email-form");
const emailInput = document.getElementById("email");
const emailInput = document.getElementById("email-input");
const submitButton = document.getElementById("submit-button");
const errorMessage = document.getElementById("errorMessage");
const errorIcon = document.getElementById("error-icon");