gaborgranger
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gaborgranger [2022/12/08 13:24] – [Add Embedded Data Fields to Survey Flow] admin | gaborgranger [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:\\ | ||
| {{ : | {{ : | ||
| - | This function is available for a reasonable fee. Contact [[https:// | + | This function is available for a reasonable fee. Contact |
| ===== Set-up Instructions ===== | ===== Set-up Instructions ===== | ||
| Line 22: | Line 24: | ||
| Paste the gaborGranger function JS into the question' | Paste the gaborGranger function JS into the question' | ||
| - | 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: |
| + | < | ||
| < | < | ||
| + | </ | ||
| ==== JavaScript Function Call ==== | ==== JavaScript Function Call ==== | ||
| Call the gaborGranger function from the question' | Call the gaborGranger function from the question' | ||
| 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: | ||
| < | < | ||
| - | Qualtrics.SurveyEngine.addOnReady(function() { | + | Qualtrics.SurveyEngine.addOnload(function() { |
| gaborGranger(this, | gaborGranger(this, | ||
| }); | }); | ||
| Line 40: | Line 44: | ||
| See **[[gaborGranger# | See **[[gaborGranger# | ||
| ==== Add Embedded Data Fields to Survey Flow ==== | ==== Add Embedded Data Fields to Survey Flow ==== | ||
| - | The gaborGranger function | + | The gaborGranger function |
| {{ : | {{ : | ||
| + | An optional fourth embedded data field (**[[gaborgranger# | ||
| ===== 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: " | + | Default: |
| ==== 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: " | + | Default: |
| + | ==== ggDisplayOrder ==== | ||
| + | **ggDisplayOrder** is the name of the embedded data field that contains the displayed order of prices when **[[gaborgranger# | ||
| + | |||
| + | Default: %%" | ||
| ==== 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: " | + | Default: |
| ==== 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: " | Default: " | ||
| + | ==== saveDisplayOrder ==== | ||
| + | **saveDisplayOrder** is a boolean that specifies if the display order of prices should be saved to **[[gaborgranger# | ||
| + | |||
| + | 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.1670523882.txt.gz · Last modified: by admin
