Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » userforms - double validation scripts

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1420 Views
  • patte
    Avatar
    Community Member
    63 Posts

    userforms - double validation scripts Link to this post

    Hey guys

    is it just me or does the userforms validation add the #Form_Form .validate two times? In my pages or some SilverStripe community projects (example: http://www.fmc-innovation.de/kontakt) there is also this double form validation... is this needed by jquery or userforms? A bug?

    patte

  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: userforms - double validation scripts Link to this post

    Today I found that this is indeed the case (at many of my SS websites). Ran into this issue with SS2.4.1 and latest UserForms module...

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: userforms - double validation scripts Link to this post

    Sounds like a bug. Raise it as a ticket on open.silverstripe.org and assign it to UserForms and I'll look into it as soon as possible.

    Thanks,

  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: userforms - double validation scripts Link to this post

    Done. Another question/remark:

    When using UserForms with Translatable, the only way I got language dependent validation working is to remove

    UserDefinedFrom.php line 473: removed $messages from custom validation script;

    and then load 'userforms/thirdparty/jquery-validate/localization/messages_nl.js' dynamically, based on the current locale (example _nl for locale nl_NL).

    I'm not sure if my solution is a correct approach (apart from changing the core), but, if so, this may be a good enhancement to enable language dependent validation messages in user forms?!

  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: userforms - double validation scripts Link to this post

    With regards to the initial problem of this topic (double custom JS validation script): this seems to be resolved in the latest trunk release of UDF.

  • patte
    Avatar
    Community Member
    63 Posts

    Re: userforms - double validation scripts Link to this post

    Thanks for that!

    Next time I`ll raise a ticket ;-)

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