Page 1 of 1

Zurb integration

Posted: 16 Jan 2017
by krahardy
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.

Re: Zurb integration

Posted: 17 Jan 2017
by Dmitry Kozlov
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 $.

Re: Zurb integration

Posted: 17 Jan 2017
by krahardy
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.

Re: Zurb integration

Posted: 18 Jan 2017
by Dmitry Kozlov
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
})