Jump to:

10929 Posts in 2613 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » userforms rules not working

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1582 Views
  • theoldlr
    Avatar
    Community Member
    103 Posts

    userforms rules not working Link to this post

    I am trying to make a dynamic form, but I'm either misunderstanding the rules or something is not working.

    For example let's say I have a drop down field "Is silverstripe your cms" with the choices 'choose', 'Yes', and 'No'. If the user selects 'No' I would want a text field to appear that says "why not?"

    The properties I would assign to the 'why not?' textfield would be 'hide by default' and 'Show this field' When 'Is silverstripe your cms' 'Value' 'No'

    Is this how it is supposed to work? It is not working for me. Do you need to put in quotes or any escape characters for special characters in the last rule field?

    Thanks!

    Edit: Just noticed this JavaScript Error in firebug... Is this the problem, Advice on a fix?:

    $("#Form_Form").validate is not a function
    anonymous()quotes?flush=1 (line 203)
    anonymous()jquery.min.js (line 19)
    anonymous([function(), function(), function()], function(), Object name=F)jquery.min.js (line 12)
    anonymous()jquery.min.js (line 19)
    anonymous()jquery.min.js (line 19)
    [Break on this error] required:1 \nquotes?flush=1 (line 203)

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: userforms rules not working Link to this post

    $("#Form_Form").validate is not a function

    That would normally mean jquery.validate.js has not loaded. What versions SS/UDF are you trying to use.

  • banal
    Avatar
    Community Member
    901 Posts
  • theoldlr
    Avatar
    Community Member
    103 Posts

    Re: userforms rules not working Link to this post

    It was a conflict with jquery as I had already implemented this. Once I replaced the reference to jquery via google with the one used by userforms everything was working as it should. Thanks for your help.

    1582 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.