simple Survey API how to or tutorial

Options
hi there -- Is there any tutorial or a how to for implementing a simple survey using the API? I've been looking on the board/help and can't find anything.

thanks!
Tagged:

Comments

  • You can use LuminateExtend library:


    1) Follow the basic setup instructions

    2) Includ the library

    3) Initialize LuminateExtend by including the following script once per page (could be at the end of your wrapper assuming you included the library in your wrapper <head>):

    luminateExtend({
    apiKey: '[[S0:CONVIO_API_KEY]]',
    path: {
    nonsecure: 'http://[[S29:DOMAIN]][[S29:PATH]]',
    secure: 'https://[[S29:SECURE_DOMAIN]][[S29:SECURE_PATH]]'
    }
    });

    4) Take a look at the survey example and make the necessary callback changes as needed.
  • Another thing you can do is 'scrape' an existing survey. This was a trick we used before the API came out.


    Put all the fields you'll need on a normal survey and publish it. Then visit the survey in your browser, view source and copy the HTML.


    Then you can remove everything but the form elements, get rid all the html that Luminate generates leaving just the form and inputs. Don't miss any!


    Paste that into a Pagebuilder page or html page and build it out like you would any other html page.


    Using the API isn't super hard and gives you more control, but this is still an option if you don't want to deal with it.
  • Fyi: I am wanting the survey to be on a non-convio site


    A couple of questions about the "scraping" method that I couldn't figure out how to solve:
    1. Is there a way to keep it from redirecting to the convio survey if there is a user error?

      (i tried using inline jquery to do a validation, but this didn't seem to work)
    2. In the convio survey if I have designated a url for the user to go to once the survey is complete -- is there a way to have this load into the same screen as the survey itself?
  • The serverside error validation issue is one of the shortcomings. I make as much of the questions non-required as possible and rely of client side validation. I like to use LiveValidation, but there are plenty. (https://github.com/alechill/livevalidation)


    The survey complete page is controlled by the original survey configuration. That can direct right back to your scraped survey. You might append a querystring param to indicate the success, so you can show a thank you line. (http://mydomain.org/survey.htm?success=true)


    Also: You can definitely use the API on a non-convio site. You'll need to whitelist that domain in the API set-up. And then of course you can't use the S-tags to pass your API key and domain in the init as Romaney showed, but you can just hard code them.
  • Second both Romany and Brian's comprehensive explanations.


    To add into the already stated, the survey API benefit use case:
    • You'll be able to have both the survey form and the thank you confirmation post submit in one single web page / pagebuilder, hence saving the need from having to build multiple pages individually. Further, you could conditionalize the content of your "Thank You" confirmation according to your user input which might be restricted if you on regular LO survey page / ghost scrape form.
    • In some use cases, you would be able to autosubmit the survey behind the scene -- one of our actual use case is that we want to enroll our team captain into a LO group upon registration, thus we have an autosubmit survey that would submit an entry into a backend LO survey which would enroll one into LO group upon submission. That group then would be used for multiple various purpose (follow up email from event managers / coordinators, or enrollment into our Team Captain online training LMS)
    • Also, if your org is collaborating with 3rd party (i.e. enrollment program etc), API survey would be the way to go because it will allow you to submit the same entry to different end points (i.e. our LO survey as well as the 3rd party enrollment repository)
    Here's an actual example of API survey (using that Noah's Luminate Extend library)


    http://main.diabetes.org/site/PageServer?pagename=Courage_Wisdom_Hope_Kit_SF -- this survey would submit to 2 different end point, our Luminate Online backend survey that is mapped to this API form, as well as into our Salesforce backend -- the requirement that we capture the data on both ends, hence.


    The above survey instance could be made embedded into responsive iframe, here's the actual implementation (this is using the previous iteration of the API form survey above (sans Salesforce submission integration) -- this is to demo the iframe responsiveness
    http://main.diabetes.org/site/PageServer/?pagename=CWH_Kit


    Here's another example of our API form survey that submits to multiple ends
    https://donations.diabetes.org/site/SPageServer/?pagename=LWT2D_English



    EDIT ADD ON:

    1.) Just got to read the follow up threads about the need to have that hosted externally -- you can still build the survey using the PageBuilder and iframe them -- the iframe should work externally, thus no need to white-list things. Will update with another link of externally embedded survey on a project about to wrap up when they are live -- thus you'll see. Or here this should showcase the use case where I have an external page that is hosted on different domain, and I am embedding that Luminate Online survey in a responsive iframe.

    http://d-techlab.net/portfolio/ADA/myLOSurvey.html


    2.) Also provided survey link is using form validation tapping into the "jQuery form validator" library.
  • This is another example of the externally hosted embedded LO using responsive iframe (note the form part are LO survey form). As long as the parent/child page are respecting the mixed-content security browser ruleset, you should be good to go, and this approach would save time of having to whitelist the external domain in order to put the API directly (not to mention, there's limit of spaces / slot of the whitelist components (at least the IP portion) are limited to a finite amount of records (which we hit that limit in past -- I think approx about 60 records max, not to mention if we have to do /24 /32 netmask that would take up spaces lot quicker))

    https://makeinsulinaffordable.org/petition/
  • Are these instructions still valid and current? I'm having a hell of a time getting through these instructions. I am not a coder so it's quite the challenge. All I need is a signup field on our WordPress site that updates in Luminate and has a decent user experience.

Categories