forms - How to make Confirm Password field in Shopify? -


i'm creating shopify website, , i'm working on customer registration form. need make confirm password field. know how in shopify?

just got working on register page:

the 2 password fields:

  <div id="create_password_container">     <label for="password">your password<em>*</em></label>     <input type="password" value="" name="customer[password]" id="create_password" {% if form.errors contains "password" %} class="error"{% endif %}>   </div>    <div id="password_confirm_container">     <label for="password_confirmation">password confirmation</label> <span class="password-match">passwords not match</span>     <input type="password" value="" name="customer[password_confirmation]" id="password_confirm" /> </div> 

javascript:

    $('form#create_customer').submit(function(e) {       if ( $('#create_password').val() === $('#password_confirm').val()) {       //alert('password good!!');      } else {       $('.password-match').fadein("slow");       e.preventdefault(); // stops our form submitting     } }); 

the css password not-matching message:

.password-match {font-size: 12px; color: #f1152f; display:none;} 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -