Problems validating forms in Facebox.

August 16th, 2008 by steamfrog

Recently I have been using Facebox on a new website I am building. Using forms in facebox seems like a smart way to go when you do not want them all over the main pages. I came across an issue with trying to validate facebox form fields… yeah.

Validation I used http://bassistance.de/jquery-plugins/jquery-plugin-validation/ - it is very good.

Here is the solution

Need to handle the onclick event of the submit button.

onClick=’$(”#my_form”).valid()’

This solved the problem of the facebox closing before the validation was complete.

Hope this helps others.

Share and Enjoy:

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • blinkbits
  • BlinkList
  • blogmarks
  • Fark
  • Fleck
  • Furl
  • IndiaGram
  • IndianPad
  • Linkter
  • Ma.gnolia
  • NewsVine
  • Reddit
  • Simpy
  • Slashdot
  • Smarking
  • SphereIt
  • Spurl
  • StumbleUpon
  • Taggly
  • TailRank
  • Technorati
  • YahooMyWeb

2 Responses

  1. Jasper Says:

    HI,

    Thanks a lot for the tip!
    How do you send the form input to a emailaddress?

    Greets,
    Jasper

  2. ICQ Says:

    good article thank you!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.