Zurb integration

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
krahardy
Posts: 2
Joined: Mon Jan 16, 2017

16 Jan 2017

Hi, thanks for a great product. Trying to integrate Zurb validation with SPForms in order to have a consistent validation framework. Unfortunately, my javascript skills are below the bar - can't get past the '$(document).Foundation' unknown. S0


- external library with it's own jquery loaded

- some of our own custom javascript in an external file

- can't seem to reference both the plumsail and Zurb namespaces, both have functionality we need.


Any pointers greatly appreciated.

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

17 Jan 2017

Hi,

You can reference the external scripts inside an HTML-control. Just drop it onto your form and insert <script src="" /> code into its Content property. Do not forget to include your own jQuery library. Then, if you need to use your own jQuery in the JS-editor, use the code:

window.$ instead of just $.

krahardy
Posts: 2
Joined: Mon Jan 16, 2017

17 Jan 2017

Thanks Dmitry, works great.


So one follow-on - Since Zurb is our design framework we use it and it's JQuery on every page. Rather than having SPForm loading it's own separate JQuery library (assuming it's doing that) can we just set SPForms to use the same library ?


Appreciate the assistance.

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

18 Jan 2017

Hi,

No, but you can use jQuery included by Forms Designer. First, define it globally in JS-editor:

window.$ = window.jQuery = Plumsail.FD.jQuery;

Then load Zurb using getScript method:

https://api.jquery.com/jquery.getscript/

ex.:

Code: Select all

$.getScript(url, function() {
  // here you can use Zurb
})

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests