User Tools

Site Tools


bleeper

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
bleeper [2022/09/28 20:39] – [bleeper - Censor offensive words in text responses] adminbleeper [2023/10/05 08:30] (current) – [bleeper - Censor offensive words in text responses] admin
Line 2: Line 2:
 The **bleeper** function censors offensive words in text responses. It flags responses with offensive words and replaces offensive words with alternative characters (e.g., #). The bleeper function can be used on any type of question that contains text responses. Access to a database of offensive words is included, but use of alternative sources is supported. The **bleeper** function censors offensive words in text responses. It flags responses with offensive words and replaces offensive words with alternative characters (e.g., #). The bleeper function can be used on any type of question that contains text responses. Access to a database of offensive words is included, but use of alternative sources is supported.
  
-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 =====
 ==== Survey Header ==== ==== Survey Header ====
-To make the function available to all questions in the survey, copy the function to the Survey Header inside a script tag: 
 Add the bleeper function to the survey header to make it available to any question in the survey.   Go to Look & Feel -> General -> Header edit -> {{::icon_source.jpg?20|}} and paste the provided bleeper function JS: Add the bleeper function to the survey header to make it available to any question in the survey.   Go to Look & Feel -> General -> Header edit -> {{::icon_source.jpg?20|}} and paste the provided bleeper function JS:
 <code> <code>
Line 19: Line 18:
 </code> </code>
  
-To override the default options, specify the desired [[bleeper#options|options]] in the second function argument as an object. For example:+To override the default options, specify the desired **[[bleeper#options|options]]** in the second function argument as an object. For example:
 <code> <code>
 Qualtrics.SurveyEngine.addOnload(function() { Qualtrics.SurveyEngine.addOnload(function() {
Line 29: Line 28:
 **addWords** is an array of offensive words to be censored in addition to the offensive words returned by jsonSource.  **addWords** is an array of offensive words to be censored in addition to the offensive words returned by jsonSource. 
  
-Default: "[]"+Default: []
 ==== bleepFlagVar ==== ==== bleepFlagVar ====
 **bleepFlagVar** is the name of an embedded data field that captures whether any words were censored by setting its value to 1. To save **bleepFlagVar** in Qualtrics response data, define it as an embedded data field in the survey flow. **bleepFlagVar** is the name of an embedded data field that captures whether any words were censored by setting its value to 1. To save **bleepFlagVar** in Qualtrics response data, define it as an embedded data field in the survey flow.
  
-Default: "bleepFlag"+Default: %%"bleepFlag"%%
 ==== jsonSource ==== ==== jsonSource ====
 **jsonSource** is the url of a webservice that returns a json string containing an array of offensive words. It can be used in place of the default database that contains approximately 470 offensive words in English. **jsonSource** is the url of a webservice that returns a json string containing an array of offensive words. It can be used in place of the default database that contains approximately 470 offensive words in English.
  
-if **jsonSource** is set to empty ("") only [[bleeper#addWords|addWords]] will be used. +if **jsonSource** is set to empty %%("")%% only **[[bleeper#addWords|addWords]]** will be used. 
 ==== removeWords ==== ==== removeWords ====
 **removeWords** is an array of words that should NOT be censored even though they are included in jsonSource.  **removeWords** is an array of words that should NOT be censored even though they are included in jsonSource. 
  
-Default: "[]"+Default: %%[]%%
 ==== replace ==== ==== replace ====
-**replace** is a boolean the specifies whether censored words should be replaced.  If false, offensive words are not replaced but the [[bleeper#bleepFlagVar|bleepFlag]] is set if any offensive words are found. +**replace** is a boolean the specifies whether censored words should be replaced.  If false, offensive words are not replaced but the **[[bleeper#bleepFlagVar|bleepFlag]]** is set if any offensive words are found. 
  
 Default: true Default: true
Line 49: Line 48:
 **replStr** a string used to replace characters in offensive words.  **replStr** a string used to replace characters in offensive words. 
  
-Default: "#"+Default: %%"#"%%
 ==== selector ==== ==== selector ====
 **selector** a css selector specifying the text input fields within the question that the bleeper function should be applied to.  **selector** can be used to enable bleeper on any type of question containing text responses or specific text responses within a question.  **selector** a css selector specifying the text input fields within the question that the bleeper function should be applied to.  **selector** can be used to enable bleeper on any type of question containing text responses or specific text responses within a question. 
  
-Default: ".InputText"+Default: %%".InputText"%%
 ====== Qualtrics Wiki ====== ====== Qualtrics Wiki ======
 [[start|Qualtrics Wiki]] [[start|Qualtrics Wiki]]
bleeper.1664411969.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki