bbzzzzt wrong, can use button, I was thinking of form vs div
This commit is contained in:
parent
060056e793
commit
405cb41098
|
@ -53,11 +53,11 @@
|
||||||
</p>
|
</p>
|
||||||
<div class="email-form" id="email-form" action="submit" novalidate>
|
<div class="email-form" id="email-form" action="submit" novalidate>
|
||||||
<label class="visually-hidden" for="email">Email</label>
|
<label class="visually-hidden" for="email">Email</label>
|
||||||
<input class="email-form__input" placeholder="Email Address" type="email" name="email" id="email" required>
|
<input class="email-form__input" placeholder="Email Address" type="email" name="email-input" id="email-input"
|
||||||
<!-- <button class="email-form__button-submit" type="submit"><img src="images/icon-arrow.svg" alt="Submit Button"> -->
|
required>
|
||||||
<!-- </button> -->
|
|
||||||
<img class="email-form__error-icon" id="error-icon" src="images/icon-error.svg" alt="Error icon">
|
<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>
|
</div>
|
||||||
<p class="email-form__error-message error-hidden" id="errorMessage">Please provide a valid email</p>
|
<p class="email-form__error-message error-hidden" id="errorMessage">Please provide a valid email</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
const validEmailFormat = /^[A-Za-z0-9][\w\+]*@[A-Za-z0-9]{3,}\.[A-Za-z]{2,}$/i;
|
const validEmailFormat = /^[A-Za-z0-9][\w\+]*@[A-Za-z0-9]{3,}\.[A-Za-z]{2,}$/i;
|
||||||
|
|
||||||
const emailForm = document.getElementById("email-form");
|
const emailForm = document.getElementById("email-form");
|
||||||
const emailInput = document.getElementById("email");
|
const emailInput = document.getElementById("email-input");
|
||||||
const submitButton = document.getElementById("submit-button");
|
const submitButton = document.getElementById("submit-button");
|
||||||
const errorMessage = document.getElementById("errorMessage");
|
const errorMessage = document.getElementById("errorMessage");
|
||||||
const errorIcon = document.getElementById("error-icon");
|
const errorIcon = document.getElementById("error-icon");
|
||||||
|
|
Loading…
Reference in New Issue