Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are times when you want feedback data given in one form to be available in another form. Or you want that only a specific answer in a form can be used as a condition to trigger another form at another moment during the customer's visit. Mopinion provides the option that the answers to questions can be available as a cookie. Here is how it works.

Step 1: Set cookie with answer

Select the question element in the form for which you want the answers to be available in another form. In the element, you can check the toggle 'Set cookie with answer'.

When the toggle is turned on the cookie name will appear. The cookie is constructed in the following way:

Code Block
MSanswer.<FORMKEY>.<QUESTION_ID> 

E.g. MSanswer.0f5831e3bf45461bc499d073f50163e08c4d5ee5.3490

...

If the question is answered and the feedback submitted the cookie is placed in the browser. The value of the cookie is the answer to the question.

Step 2: Store value

Now that the cookie is set you can store the value with feedback from another form. It is also possible to use the value in another form to trigger specific questions. Or you can use the cookie value in a condition in the deployment manager.

Step

...

2a: Store the value in another form

To pick up the cookie value in another form you have to include the 'Website data' element. (Additional information with regard to the 'Website data' element can be found onHow do I add additional website data to a feedback result?) Once the element is added you set the value to be imported to 'Cookie' and the cookie name to

Code Block
MSanswer.<FORMKEY>.<QUESTION_ID>

E.g. MSanswer.0f5831e3bf45461bc499d073f50163e08c4d5ee5.3490.

...

As soon as the form opens it will check if the specific cookie is present. If so it will add the value to feedback data that will be posted when the form is submitted.

Step

...

2b: Use the value in another form to trigger a specific question

To set this up you have to use global form logic. The settings are similar to the way you import the cookie values but now you can use it to show or hide specific questions. If you want to show a question based on the cookie, first put the element on hide hiden and then add global logic rules to show it based on the value of the cookie. More information on how to use the global logic rules can be found here: How do I add form logic based on cookies or URL parameters?.

Step

...

2c: Use value in the deployment manager

First follow the steps to set up the deployment described here: How do I deploy my feedback form?. When you're in the deployment scroll through the list with options and find the option 'Show ‘Show based on the users user’s cookies'.

...

Use the name of the cookie and set your conditions.

...

Easy html macro
theme{"label":"solarized_dark","value":"solarized_dark"}
contentByMode{"html":"<div id=\"surveyContent\"></div>","javascript":"var confluenceData = {};\nvar pageId;\nvar pageTitle;\n\ntry {\n confluenceData = JSON.parse(parent.window.name);\n var pageId = confluenceData.options.productContext['page.id'];\n var pageTitle = confluenceData.options.productContext['page.title'];\n} catch(e) {}\n\nvar src = 'https://collect.mopinion.com/assets/surveys/2.0/js/survey.min.js';\n\nvar vars = {\n key:'211a4fdb96626776846147095cc335b448e20458', \n domain:'app.mopinion.com', \n divName:'surveyContent', \n button:false, \n use_collect:false, \n useQuerySelectorAll:false\n};\n\nvar s = document.createElement('script');\ns.async = 'async';\ns.id = 'mopinionFeedbackScript';\ns.src = src;\ns.onload = s.onreadystatechange = function() {\n if (!s.readyState || s.readyState === 'loaded' || s.readyState === 'complete') {\n try {\n srv.loadSurvey(vars);\n } catch (e) {}\n }\n}\ndocument.head.appendChild(s);","css":""}