Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Error messages always displayed when using Abide validation #719

Closed
phylaxis opened this issue Feb 9, 2016 · 2 comments
Closed

Error messages always displayed when using Abide validation #719

phylaxis opened this issue Feb 9, 2016 · 2 comments

Comments

@phylaxis
Copy link

phylaxis commented Feb 9, 2016

When building a form within the Foundation Press theme and using Abide validation there seems to be an issue where the error text is always displayed. This should load hidden and only appear when the error is triggered. Below is a simple example. The text in the <small class="error"> element should not be displayed on load, but for some reason it is.

<form data-abide id="signupform" action="<?php echo wp_registration_url(); ?>" method="post">
<label for="email"><?php _e( 'Email', 'tmo-accounts' ); ?> <strong>*</strong>
     <input type="text" name="email" id="email" required pattern="email" />
</label>
<small class="error">A valid email address is required.</small>  

<p><input type="submit" name="submit" class="button-primary register-button" value="<?php _e( 'Register', 'tmo-accounts' ); ?>"/></p>
</form>
@olefredrik
Copy link
Owner

Try changing <small class="error"> to <small class="form-error">

I've recently added an Abide demo to the kichen sink template.

Please let me know if this helps.

@phylaxis
Copy link
Author

phylaxis commented Mar 8, 2016

Thanks. Guess the issue was I was still using the 'old' Foundation 5 markup.

@phylaxis phylaxis closed this as completed Mar 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants