Jump to:

2002 Posts in 1422 Topics by 616 members

Form Questions

SilverStripe Forums » Form Questions » Need help getting my form to validate

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 758 Views
  • talknmime
    Avatar
    Community Member
    7 Posts

    Need help getting my form to validate Link to this post

    FYI, I'm a total n00b when it comes to SilverStripe so I'm not sure if anything I'm doing is right...

    My task: Add a small signup form to the footer of our entire website.

    What I'v done: I started off by creating a new 'User Defined Form' page to create the form. Then I copied the code for this form and placed it into my Footer.ss file. After tweaking the CSS I got everything to look right and the form does function including some validation. The problem is that the user doesn't get any kind of feedback to let them know if their entry is valid. If you put something that is not valid and click 'Submit' the page just refreshes. I would like the input box to show a red border when an invalid entry is detected.

    This is the page for the actual form: http://gg2staging.ggiagency.com/updates-signup and you can see the form I've added into the footer.

    So... what did I do wrong? Or what am I missing to make this work the way I want?

    758 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.