jQuery validation for form inputs

Discussions about Forms Designer for SharePoint 2010.
Locked
steve4ride
Posts: 2
Joined: Thu Nov 15, 2012

17 Nov 2012

Hi,

I use to work with jQuery validation plugin, but as I have seen in this blog you provide custom validation based on aler() method. Can you include jQuery validation plugin in your tool. It'll be really handy.

User avatar
Anthony (Support)
Moderator
Posts: 11
Joined: Sat Nov 17, 2012

18 Nov 2012

Hello, steve4ride.

You can add jQuery validate script to page, just upload script file to SharePoint library like Styles Library, then open JavaScript window of SharePoint Forms Designer

Image


Put following code to code editor:


//add jQuery validate script to page

var s = document.createElement("script");

s.type = "text/javascript";

s.src = "<Link to script>";

$("head").append(s);



Replace <Link to script> with link to uploaded script. After that you can use validation plugin as you use to.

User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

01 Aug 2016

Is this still a valid method to referrence a external plugin?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

02 Aug 2016

It's better to use HTML-control to reference external scripts.

User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

02 Aug 2016

Can you give an example what you mean by HTML control?

User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

02 Aug 2016

i guess you are just talking about <script type="" src=""></script>

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

03 Aug 2016

Yes, right.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests