User Tools

Site Tools


gaborgranger

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gaborgranger [2022/12/08 13:18] – [Add stroopTest Function To Question] admingaborgranger [2023/10/05 08:39] (current) – [gaborGranger - Use the Gabor Granger method to determine the price of a new product or service] admin
Line 4: Line 4:
   * Only requires one question in a loop & merge block   * Only requires one question in a loop & merge block
   * Simple and flexible set-up   * Simple and flexible set-up
 +  * Supports multiple Gabor Granger exercises in a survey
 +  * Optionally save the display order of prices
  
 Here is a demo:\\ Here is a demo:\\
 {{ :gaborGranger.mp4?600 |gaborGranger Demo}} {{ :gaborGranger.mp4?600 |gaborGranger Demo}}
  
-This function is available for a reasonable fee. Contact [[https://community.qualtrics.com/XMcommunity/messages/add/TomG|TomG]] on the Qualtrics Community to learn more.+This function is available for a reasonable fee. Contact **[[https://community.qualtrics.com/inbox/conversation?with=373|TomG]]** on the Qualtrics Community to learn more.
  
 ===== Set-up Instructions ===== ===== Set-up Instructions =====
Line 19: Line 21:
 </code> </code>
 Add display logic to only display the question if the embedded data field **[[gaborgranger#ggFound|ggFound]]** is not equal to 1. Add display logic to only display the question if the embedded data field **[[gaborgranger#ggFound|ggFound]]** is not equal to 1.
-===Add gaborGranger Function===+====Add gaborGranger Function====
 Paste the gaborGranger function JS into the question's JS outside the existing Qualtrics functions. Paste the gaborGranger function JS into the question's JS outside the existing Qualtrics functions.
  
-To make the function available to all multiple Gabor Granger questions in the survey, copy the function to the Survey Header inside a script tag. Go to Look & Feel → General → Header edit →  and paste the provided gaborGranger function JS:+To make the function available to multiple Gabor Granger questions in the survey, copy the function to the Survey Header inside a script tag. Go to Look & Feel → General → Header edit →  and paste the provided gaborGranger function JS: 
 +<code>
 <script>/*Paste gaborGrander function JS here*/</script> <script>/*Paste gaborGrander function JS here*/</script>
 +</code>
 ==== JavaScript Function Call ==== ==== JavaScript Function Call ====
 Call the gaborGranger function from the question's addOnload function using the default settings as follows: Call the gaborGranger function from the question's addOnload function using the default settings as follows:
Line 34: Line 38:
 To override the default options, specify the desired options in the second function argument as an object. For example: To override the default options, specify the desired options in the second function argument as an object. For example:
 <code> <code>
-Qualtrics.SurveyEngine.addOnReady(function() { +Qualtrics.SurveyEngine.addOnload(function() { 
- gaborGranger(this,{ggPrices:"pricelist"});+ gaborGranger(this,{delim:"|"});
 }); });
 </code> </code>
 See **[[gaborGranger#Options|Options]]** for details. See **[[gaborGranger#Options|Options]]** for details.
 ==== Add Embedded Data Fields to Survey Flow ==== ==== Add Embedded Data Fields to Survey Flow ====
-The gaborGranger function uses three embedded data fields: a delimited list of prices (e.g., ggPrices), a found flag (e.g., ggFound), and the Gabor Granger variable (e.g., ggPrice). Prior to the gaborGranger block, initialize the embedded data fields. For example: +The gaborGranger function requires three embedded data fields: a delimited list of prices (**[[gaborgranger#ggPrices|ggPrices]]**), a found flag (**[[gaborgranger#ggFound|ggFound]]**), and the Gabor Granger variable (**[[gaborgranger#ggPrice|ggPrice]]**). Prior to the gaborGranger block, initialize the embedded data fields. For example: 
 {{ :gg_surveyflow.png?800 |gaborGranger Survey Flow}} {{ :gg_surveyflow.png?800 |gaborGranger Survey Flow}}
 +An optional fourth embedded data field (**[[gaborgranger#ggDisplayOrder|ggDisplayOrder]]**) can be added.
 ===== Options ===== ===== Options =====
 ==== delim ==== ==== delim ====
 **delim** is the string used to delimit prices in the ggPrices price list. **delim** is the string used to delimit prices in the ggPrices price list.
  
-Default: ","+Default: %%","%%
 ==== displayPriceClass ==== ==== displayPriceClass ====
 **displayPriceClass** is the name of a html class used to identify the html span that contains the price in the gaborGranger question text. **displayPriceClass** is the name of a html class used to identify the html span that contains the price in the gaborGranger question text.
  
-Default: "price"+Default: %%"price"%%
 ==== ggFound ==== ==== ggFound ====
-**ggFound** is the name of the embedded data field that flags if the final Gabor Granger price has been found.+**ggFound** is the name of the embedded data field flag that is set to 1 when the final Gabor Granger price has been found.
  
-Default: "ggFound"+Default: %%"ggFound"%% 
 +==== ggDisplayOrder ==== 
 +**ggDisplayOrder** is the name of the embedded data field that contains the displayed order of prices when **[[gaborgranger#saveDisplayOrder|saveDisplayOrder]]** is true. 
 + 
 +Default: %%"ggDisplayOrder"%%
 ==== ggPrice ==== ==== ggPrice ====
 **ggPrice** is the name of the embedded data field that contains the Gabor Granger variable (aka price) **ggPrice** is the name of the embedded data field that contains the Gabor Granger variable (aka price)
  
-Default: "ggPrice"+Default: %%"ggPrice"%%
 ==== ggPrices ==== ==== ggPrices ====
-**ggPrice** is the name of the embedded data field that contains the delimited Gabor Granger price list.+**ggPrices** is the name of the embedded data field that contains the delimited Gabor Granger price list.
  
 Default: "ggPrices" Default: "ggPrices"
 +==== saveDisplayOrder ====
 +**saveDisplayOrder** is a boolean that specifies if the display order of prices should be saved to **[[gaborgranger#ggDisplayOrder|ggDisplayOrder]]**.
 +
 +Default: false
 ==== top2Recode ==== ==== top2Recode ====
 **top2Recode** is the recode value of the first of the top 2 choices. **top2Recode** is the recode value of the first of the top 2 choices.
gaborgranger.1670523524.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki