Zurb integration

rss

Posted by krahardy - Jan 16 ’17 at 06:51

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.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 26 days
    #1 by Dmitry Kozlov Jan 17 ’17 at 09:18

    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
    Member
    Member for: 2 years 7 months
    #2 by krahardy Jan 17 ’17 at 04:40

    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.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 26 days
    #3 by Dmitry Kozlov Jan 18 ’17 at 05:00

    [#2]: 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.:

    $.getScript(url, function() {
      // here you can use Zurb
    })
    
Displaying 1 to 3 of 3 messages