Validations fail to trigger when used on hidden forms. #429

Closed
abitdodgy opened this Issue Nov 6, 2012 · 1 comment

2 participants

@abitdodgy

Client Side Validations does not seem to work on hidden forms. One of my pages has a form that is only displayed when the user clicks a button.

# events.css.sass
form#new_event
  display: none
# events.js.coffee
$('button.show_new_event_form').click (e) ->
  e.preventDefault()
  $('form#new_event').slideDown()

Tabbing in and out has no effect on the form. If I remove the display: none line, everything works as expected. Any idea why this is? Or is there a way to work around it? I'm using the latest Chrome/Safari on OSX Mountain Lion.

@bcardarella

This is by design. You will have to enable the form during the callback https://github.com/bcardarella/client_side_validations#enabling

@bcardarella bcardarella closed this Nov 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment