﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 6  » Inserting a Live Checkbox Counter</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 26 May 2026 02:18:40 GMT</lastBuildDate><ttl>20</ttl><item><title>Inserting a Live Checkbox Counter</title><link>https://forums.millisecond.com/Topic39959.aspx</link><description>Hello!&lt;br/&gt;I am designing a study where participants see a list of about 200 traits and have to select 80 in order to continue. I am using the checkboxes element so that they can make multiple selections. I also have the traits spread over 4 different checkboxes, so that I could create multiple columns. They are shown an error message if they do not select 80 traits. I wanted to know if:&lt;br/&gt;1. There is a way to insert a live counter which would show the participant how many traits they've already selected. For example, if they've selected 10 traits so far the counter would show 10 on the screen.&amp;nbsp;&lt;br/&gt;2. If not, then is there a way to make sure that the participants maintain their previously selected choices after viewing the error message? Right now, they see the error message, and are then routed back to the survey page, but lose all of their previous selections.&lt;br/&gt;I appreciate any advice! Here is the script which contains all of the relevant elements for this task:&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage X_traits_1&amp;gt;&lt;br/&gt;/ caption = "Choose 80 traits that best describe &amp;lt;%item.novelperson.item(values.personXnumber)%&amp;gt;..."&lt;br/&gt;/ questions = [1 = X_traits_1; 2 = X_traits_2; 3 = X_traits_3; 4 = X_traits_4]&lt;br/&gt;/ nextbuttonposition = (75%, 260%)&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [if ((checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount) != 80) trial.error_1]&lt;br/&gt;/ stimulusframes = [1=selectedcount1]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text selectedcount1&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount%&amp;gt;")&lt;br/&gt;/ position = (85%, 10%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_1&amp;gt;&lt;br/&gt;/ options = ("smart", "funny", "friendly", "fun", "kind", "outgoing", "talented", "adventurous",&lt;br/&gt;"interesting", "nice", "driven", "social", "athletic", "creative", "extraverted", "hardworking", &lt;br/&gt;"involved", "honest", "organized", "caring", "independent", "open-minded", "positive", "thoughtful", &lt;br/&gt;"approachable",&lt;br/&gt;"careless", "boring", "disorganized", "rude", "lazy", "indecisive", "quiet", "pessimistic", "annoying", &lt;br/&gt;"dumb", "arrogant", "unfocused", "unfriendly", "impulsive", "selfish", "serious", "unsure", "weird", &lt;br/&gt;"basic", "distracted", "judgmental", "loud", "meek", "messy", "aloof", "antisocial", "awkward", &lt;br/&gt;"close-minded", "conceited", "crude")&lt;br/&gt;/ position = (15%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_2&amp;gt;&lt;br/&gt;/ options = ("brave", "calm", "carefree", "easygoing", "happy", "humble", "joyful", "motivated", "passionate",&lt;br/&gt;"analytical", "chill", "confident", "diligent", "engaged", "goal-focused", "loyal", "personable", &lt;br/&gt;"respectful", "studious", "well-spoken", "accepting", "accomplished", "active", "adaptable", "affable", &lt;br/&gt;"egocentric", "hasty", "immature", "impatient", "inconsistent", "insecure", "negative", "obnoxious", "overbearing", &lt;br/&gt;"regretful", "rigid", "try-hard", "vague", "bothered", "braggy", "busy", "chaotic", "cliquish", &lt;br/&gt;"cold", "competitive", "condescending", "confusing", "cowardly", "crazy", "cynical", "demeaning", "detached", &lt;br/&gt;"disrespectful", "distant", "ditzy")&lt;br/&gt;/ position = (35%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_3&amp;gt;&lt;br/&gt;/ options = ("amazing", "ambitious", "artistic", "aware", "balanced", "careful", "compassionate", "cultured",&lt;br/&gt;"curious", "deep-thinker", "descriptive", "direct", "eager", "engaging", "entertaining", "explorative", &lt;br/&gt;"future-focused", "genuine", "hardworker", "healthy", "interactive", "laid-back", "leader", "likeable", &lt;br/&gt;"mature",&lt;br/&gt;"dry", "dull", "eccentric", "fearful", "flustered", "foolish", "forgetful", "frivolous", "generic", &lt;br/&gt;"guarded", "hesitant", "ignorant", "inactive", "indifferent", "insincere", "intimidating", "introvert", "irresponsible", &lt;br/&gt;"irritating", "jealous", "kill-joy", "lonely", "nerdy", "one-dimensional", "overconfident", "overwhelmed", "overwhelming", &lt;br/&gt;"preoccupied", "reckless", "regular")&lt;br/&gt;/ position = (55%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_4&amp;gt;&lt;br/&gt;/ options = ("mindful", "normal", "opportunist", "outdoorsy", "peaceful", "planner", "quirky", "realistic",&lt;br/&gt;"relaxed", "reliable", "resilient", "responsible", "self-aware", "sociable", "spirited", "stable", &lt;br/&gt;"supportive", "thorough", "truthful", "understanding", "visionary", "well-mannered", "well-rounded", "wise", &lt;br/&gt;"risky", "self-absorbed", "shallow", "simple", "snobbish", "stressed", "stringent", "stupid", "tired", &lt;br/&gt;"typical", "unapproachable", "uncharming", "uncool", "unenergetic", "unexciting", "unimaginable", "unintellectual", "unintelligent", &lt;br/&gt;"uninteresting", "uninvolved", "unmotivated", "unorganized", "unoriginal", "unproductive", "unserious", "untalkative")&lt;br/&gt;/ position = (75%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text back&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;&amp;lt; Go Back")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;/ fontstyle = ("Arial", 3%, false, false, true, false, 5, 0)&lt;br/&gt;/ txcolor = blue&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial error_1&amp;gt;&lt;br/&gt;/ stimulusframes = [1=error, back]&lt;br/&gt;/ correctresponse = (back)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ branch = [if (trial.error_1.correctstreak &amp;gt;= 1) surveypage.X_traits_1]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;</description><pubDate>Wed, 30 Apr 2025 13:39:28 GMT</pubDate><dc:creator>vicki.rivera</dc:creator></item><item><title>RE: Inserting a Live Checkbox Counter</title><link>https://forums.millisecond.com/Topic40098.aspx</link><description>&lt;blockquote data-id="39962" class="if-quote-wrapper" unselectable="on" data-guid="1746020302413" contenteditable="false" id="if_insertedNode_1746020301471"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39962" title=""&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39962" title=""&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39962" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39962"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;blockquote data-id="39961" class="if-quote-wrapper" unselectable="on" data-guid="1746020302413" contenteditable="false" id="if_insertedNode_1745964397303"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39961" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39961" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39961" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;vicki.rivera - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39961"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="39960" class="if-quote-wrapper" unselectable="on" data-guid="1746020302413" contenteditable="false" id="if_insertedNode_1745964022460"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39960" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39960" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39960" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39960"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="39959" class="if-quote-wrapper" unselectable="on" data-guid="1746020302413" contenteditable="false" id="if_insertedNode_1745953771641"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39959" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39959" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39959" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;vicki.rivera - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39959"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hello!&lt;br/&gt;I am designing a study where participants see a list of about 200 traits and have to select 80 in order to continue. I am using the checkboxes element so that they can make multiple selections. I also have the traits spread over 4 different checkboxes, so that I could create multiple columns. They are shown an error message if they do not select 80 traits. I wanted to know if:&lt;br/&gt;1. There is a way to insert a live counter which would show the participant how many traits they've already selected. For example, if they've selected 10 traits so far the counter would show 10 on the screen.&amp;nbsp;&lt;br/&gt;2. If not, then is there a way to make sure that the participants maintain their previously selected choices after viewing the error message? Right now, they see the error message, and are then routed back to the survey page, but lose all of their previous selections.&lt;br/&gt;I appreciate any advice! Here is the script which contains all of the relevant elements for this task:&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage X_traits_1&amp;gt;&lt;br/&gt;/ caption = "Choose 80 traits that best describe &amp;lt;%item.novelperson.item(values.personXnumber)%&amp;gt;..."&lt;br/&gt;/ questions = [1 = X_traits_1; 2 = X_traits_2; 3 = X_traits_3; 4 = X_traits_4]&lt;br/&gt;/ nextbuttonposition = (75%, 260%)&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [if ((checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount) != 80) trial.error_1]&lt;br/&gt;/ stimulusframes = [1=selectedcount1]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text selectedcount1&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount%&amp;gt;")&lt;br/&gt;/ position = (85%, 10%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_1&amp;gt;&lt;br/&gt;/ options = ("smart", "funny", "friendly", "fun", "kind", "outgoing", "talented", "adventurous",&lt;br/&gt;"interesting", "nice", "driven", "social", "athletic", "creative", "extraverted", "hardworking", &lt;br/&gt;"involved", "honest", "organized", "caring", "independent", "open-minded", "positive", "thoughtful", &lt;br/&gt;"approachable",&lt;br/&gt;"careless", "boring", "disorganized", "rude", "lazy", "indecisive", "quiet", "pessimistic", "annoying", &lt;br/&gt;"dumb", "arrogant", "unfocused", "unfriendly", "impulsive", "selfish", "serious", "unsure", "weird", &lt;br/&gt;"basic", "distracted", "judgmental", "loud", "meek", "messy", "aloof", "antisocial", "awkward", &lt;br/&gt;"close-minded", "conceited", "crude")&lt;br/&gt;/ position = (15%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_2&amp;gt;&lt;br/&gt;/ options = ("brave", "calm", "carefree", "easygoing", "happy", "humble", "joyful", "motivated", "passionate",&lt;br/&gt;"analytical", "chill", "confident", "diligent", "engaged", "goal-focused", "loyal", "personable", &lt;br/&gt;"respectful", "studious", "well-spoken", "accepting", "accomplished", "active", "adaptable", "affable", &lt;br/&gt;"egocentric", "hasty", "immature", "impatient", "inconsistent", "insecure", "negative", "obnoxious", "overbearing", &lt;br/&gt;"regretful", "rigid", "try-hard", "vague", "bothered", "braggy", "busy", "chaotic", "cliquish", &lt;br/&gt;"cold", "competitive", "condescending", "confusing", "cowardly", "crazy", "cynical", "demeaning", "detached", &lt;br/&gt;"disrespectful", "distant", "ditzy")&lt;br/&gt;/ position = (35%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_3&amp;gt;&lt;br/&gt;/ options = ("amazing", "ambitious", "artistic", "aware", "balanced", "careful", "compassionate", "cultured",&lt;br/&gt;"curious", "deep-thinker", "descriptive", "direct", "eager", "engaging", "entertaining", "explorative", &lt;br/&gt;"future-focused", "genuine", "hardworker", "healthy", "interactive", "laid-back", "leader", "likeable", &lt;br/&gt;"mature",&lt;br/&gt;"dry", "dull", "eccentric", "fearful", "flustered", "foolish", "forgetful", "frivolous", "generic", &lt;br/&gt;"guarded", "hesitant", "ignorant", "inactive", "indifferent", "insincere", "intimidating", "introvert", "irresponsible", &lt;br/&gt;"irritating", "jealous", "kill-joy", "lonely", "nerdy", "one-dimensional", "overconfident", "overwhelmed", "overwhelming", &lt;br/&gt;"preoccupied", "reckless", "regular")&lt;br/&gt;/ position = (55%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_4&amp;gt;&lt;br/&gt;/ options = ("mindful", "normal", "opportunist", "outdoorsy", "peaceful", "planner", "quirky", "realistic",&lt;br/&gt;"relaxed", "reliable", "resilient", "responsible", "self-aware", "sociable", "spirited", "stable", &lt;br/&gt;"supportive", "thorough", "truthful", "understanding", "visionary", "well-mannered", "well-rounded", "wise", &lt;br/&gt;"risky", "self-absorbed", "shallow", "simple", "snobbish", "stressed", "stringent", "stupid", "tired", &lt;br/&gt;"typical", "unapproachable", "uncharming", "uncool", "unenergetic", "unexciting", "unimaginable", "unintellectual", "unintelligent", &lt;br/&gt;"uninteresting", "uninvolved", "unmotivated", "unorganized", "unoriginal", "unproductive", "unserious", "untalkative")&lt;br/&gt;/ position = (75%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text back&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;&amp;lt; Go Back")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;/ fontstyle = ("Arial", 3%, false, false, true, false, 5, 0)&lt;br/&gt;/ txcolor = blue&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial error_1&amp;gt;&lt;br/&gt;/ stimulusframes = [1=error, back]&lt;br/&gt;/ correctresponse = (back)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ branch = [if (trial.error_1.correctstreak &amp;gt;= 1) surveypage.X_traits_1]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="39959"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;&amp;gt; 1. There is a way to insert a live counter which would show the participant how many traits they've already selected. For example, if they've selected 10 traits so far the counter would show 10 on the screen. &lt;br/&gt;&lt;br/&gt;No.&lt;br/&gt;&lt;br/&gt;&amp;gt; 2. If not, then is there a way to make sure that the participants maintain their previously selected choices after viewing the error message? Right now, they see the error message, and are then routed back to the survey page, but lose all of their previous selections.&lt;br/&gt;&lt;br/&gt;Use a &amp;lt;survey&amp;gt; to run the page, not a &amp;lt;block&amp;gt;. That, however, means you'll have to use a &amp;lt;surveypage&amp;gt; to display the error message, not a &amp;lt;trial&amp;gt;.&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;surveypage X_traits_1&amp;gt;&lt;br/&gt;/ caption = "Choose 80 traits that best describe..."&lt;br/&gt;/ questions = [1 = X_traits_1; 2 = X_traits_2; 3 = X_traits_3; 4 = X_traits_4]&lt;br/&gt;/ nextbuttonposition = (75%, 260%)&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [if ((checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount) != 80) surveypage.error_1]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_1&amp;gt;&lt;br/&gt;/ options = ("smart", "funny", "friendly", "fun", "kind", "outgoing", "talented", "adventurous",&lt;br/&gt;"interesting", "nice", "driven", "social", "athletic", "creative", "extraverted", "hardworking",&lt;br/&gt;"involved", "honest", "organized", "caring", "independent", "open-minded", "positive", "thoughtful",&lt;br/&gt;"approachable",&lt;br/&gt;"careless", "boring", "disorganized", "rude", "lazy", "indecisive", "quiet", "pessimistic", "annoying",&lt;br/&gt;"dumb", "arrogant", "unfocused", "unfriendly", "impulsive", "selfish", "serious", "unsure", "weird",&lt;br/&gt;"basic", "distracted", "judgmental", "loud", "meek", "messy", "aloof", "antisocial", "awkward",&lt;br/&gt;"close-minded", "conceited", "crude")&lt;br/&gt;/ position = (15%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_2&amp;gt;&lt;br/&gt;/ options = ("brave", "calm", "carefree", "easygoing", "happy", "humble", "joyful", "motivated", "passionate",&lt;br/&gt;"analytical", "chill", "confident", "diligent", "engaged", "goal-focused", "loyal", "personable",&lt;br/&gt;"respectful", "studious", "well-spoken", "accepting", "accomplished", "active", "adaptable", "affable",&lt;br/&gt;"egocentric", "hasty", "immature", "impatient", "inconsistent", "insecure", "negative", "obnoxious", "overbearing",&lt;br/&gt;"regretful", "rigid", "try-hard", "vague", "bothered", "braggy", "busy", "chaotic", "cliquish",&lt;br/&gt;"cold", "competitive", "condescending", "confusing", "cowardly", "crazy", "cynical", "demeaning", "detached",&lt;br/&gt;"disrespectful", "distant", "ditzy")&lt;br/&gt;/ position = (35%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_3&amp;gt;&lt;br/&gt;/ options = ("amazing", "ambitious", "artistic", "aware", "balanced", "careful", "compassionate", "cultured",&lt;br/&gt;"curious", "deep-thinker", "descriptive", "direct", "eager", "engaging", "entertaining", "explorative",&lt;br/&gt;"future-focused", "genuine", "hardworker", "healthy", "interactive", "laid-back", "leader", "likeable",&lt;br/&gt;"mature",&lt;br/&gt;"dry", "dull", "eccentric", "fearful", "flustered", "foolish", "forgetful", "frivolous", "generic",&lt;br/&gt;"guarded", "hesitant", "ignorant", "inactive", "indifferent", "insincere", "intimidating", "introvert", "irresponsible",&lt;br/&gt;"irritating", "jealous", "kill-joy", "lonely", "nerdy", "one-dimensional", "overconfident", "overwhelmed", "overwhelming",&lt;br/&gt;"preoccupied", "reckless", "regular")&lt;br/&gt;/ position = (55%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_4&amp;gt;&lt;br/&gt;/ options = ("mindful", "normal", "opportunist", "outdoorsy", "peaceful", "planner", "quirky", "realistic",&lt;br/&gt;"relaxed", "reliable", "resilient", "responsible", "self-aware", "sociable", "spirited", "stable",&lt;br/&gt;"supportive", "thorough", "truthful", "understanding", "visionary", "well-mannered", "well-rounded", "wise",&lt;br/&gt;"risky", "self-absorbed", "shallow", "simple", "snobbish", "stressed", "stringent", "stupid", "tired",&lt;br/&gt;"typical", "unapproachable", "uncharming", "uncool", "unenergetic", "unexciting", "unimaginable", "unintellectual", "unintelligent",&lt;br/&gt;"uninteresting", "uninvolved", "unmotivated", "unorganized", "unoriginal", "unproductive", "unserious", "untalkative")&lt;br/&gt;/ position = (75%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage error_1&amp;gt;&lt;br/&gt;/ stimulusframes = [1=error]&lt;br/&gt;/ branch = [surveypage.X_traits_1]&lt;br/&gt;/ showbackbutton = false&lt;br/&gt;/ finishlabel = "Back"&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;survey example&amp;gt;&lt;br/&gt;/ pages = [1=surveypage.X_traits_1]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;[/code]&lt;a class="if-quote-goto quote-link" href="#" data-id="39960"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;This worked! Thank you.&lt;a class="if-quote-goto quote-link" href="#" data-id="39961"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;By the way, you can make the error message friendlier / more informative by including the number of traits currently selected.&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.&lt;br/&gt;(You currently have &amp;lt;%checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount%&amp;gt; selected.)")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;[/code]&lt;a class="if-quote-goto quote-link" href="#" data-id="39962"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;Yes! This helps, thank you.&lt;br/&gt;</description><pubDate>Wed, 30 Apr 2025 13:39:28 GMT</pubDate><dc:creator>vicki.rivera</dc:creator></item><item><title>RE: Inserting a Live Checkbox Counter</title><link>https://forums.millisecond.com/Topic39962.aspx</link><description>&lt;blockquote data-id="39961" class="if-quote-wrapper" unselectable="on" data-guid="1745964398401" contenteditable="false" id="if_insertedNode_1745964397303"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39961" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39961" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39961" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;vicki.rivera - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39961"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="39960" class="if-quote-wrapper" unselectable="on" data-guid="1745964398401" contenteditable="false" id="if_insertedNode_1745964022460"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39960" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39960" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39960" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39960"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="39959" class="if-quote-wrapper" unselectable="on" data-guid="1745964398401" contenteditable="false" id="if_insertedNode_1745953771641"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39959" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39959" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39959" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;vicki.rivera - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39959"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hello!&lt;br/&gt;I am designing a study where participants see a list of about 200 traits and have to select 80 in order to continue. I am using the checkboxes element so that they can make multiple selections. I also have the traits spread over 4 different checkboxes, so that I could create multiple columns. They are shown an error message if they do not select 80 traits. I wanted to know if:&lt;br/&gt;1. There is a way to insert a live counter which would show the participant how many traits they've already selected. For example, if they've selected 10 traits so far the counter would show 10 on the screen.&amp;nbsp;&lt;br/&gt;2. If not, then is there a way to make sure that the participants maintain their previously selected choices after viewing the error message? Right now, they see the error message, and are then routed back to the survey page, but lose all of their previous selections.&lt;br/&gt;I appreciate any advice! Here is the script which contains all of the relevant elements for this task:&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage X_traits_1&amp;gt;&lt;br/&gt;/ caption = "Choose 80 traits that best describe &amp;lt;%item.novelperson.item(values.personXnumber)%&amp;gt;..."&lt;br/&gt;/ questions = [1 = X_traits_1; 2 = X_traits_2; 3 = X_traits_3; 4 = X_traits_4]&lt;br/&gt;/ nextbuttonposition = (75%, 260%)&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [if ((checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount) != 80) trial.error_1]&lt;br/&gt;/ stimulusframes = [1=selectedcount1]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text selectedcount1&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount%&amp;gt;")&lt;br/&gt;/ position = (85%, 10%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_1&amp;gt;&lt;br/&gt;/ options = ("smart", "funny", "friendly", "fun", "kind", "outgoing", "talented", "adventurous",&lt;br/&gt;"interesting", "nice", "driven", "social", "athletic", "creative", "extraverted", "hardworking", &lt;br/&gt;"involved", "honest", "organized", "caring", "independent", "open-minded", "positive", "thoughtful", &lt;br/&gt;"approachable",&lt;br/&gt;"careless", "boring", "disorganized", "rude", "lazy", "indecisive", "quiet", "pessimistic", "annoying", &lt;br/&gt;"dumb", "arrogant", "unfocused", "unfriendly", "impulsive", "selfish", "serious", "unsure", "weird", &lt;br/&gt;"basic", "distracted", "judgmental", "loud", "meek", "messy", "aloof", "antisocial", "awkward", &lt;br/&gt;"close-minded", "conceited", "crude")&lt;br/&gt;/ position = (15%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_2&amp;gt;&lt;br/&gt;/ options = ("brave", "calm", "carefree", "easygoing", "happy", "humble", "joyful", "motivated", "passionate",&lt;br/&gt;"analytical", "chill", "confident", "diligent", "engaged", "goal-focused", "loyal", "personable", &lt;br/&gt;"respectful", "studious", "well-spoken", "accepting", "accomplished", "active", "adaptable", "affable", &lt;br/&gt;"egocentric", "hasty", "immature", "impatient", "inconsistent", "insecure", "negative", "obnoxious", "overbearing", &lt;br/&gt;"regretful", "rigid", "try-hard", "vague", "bothered", "braggy", "busy", "chaotic", "cliquish", &lt;br/&gt;"cold", "competitive", "condescending", "confusing", "cowardly", "crazy", "cynical", "demeaning", "detached", &lt;br/&gt;"disrespectful", "distant", "ditzy")&lt;br/&gt;/ position = (35%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_3&amp;gt;&lt;br/&gt;/ options = ("amazing", "ambitious", "artistic", "aware", "balanced", "careful", "compassionate", "cultured",&lt;br/&gt;"curious", "deep-thinker", "descriptive", "direct", "eager", "engaging", "entertaining", "explorative", &lt;br/&gt;"future-focused", "genuine", "hardworker", "healthy", "interactive", "laid-back", "leader", "likeable", &lt;br/&gt;"mature",&lt;br/&gt;"dry", "dull", "eccentric", "fearful", "flustered", "foolish", "forgetful", "frivolous", "generic", &lt;br/&gt;"guarded", "hesitant", "ignorant", "inactive", "indifferent", "insincere", "intimidating", "introvert", "irresponsible", &lt;br/&gt;"irritating", "jealous", "kill-joy", "lonely", "nerdy", "one-dimensional", "overconfident", "overwhelmed", "overwhelming", &lt;br/&gt;"preoccupied", "reckless", "regular")&lt;br/&gt;/ position = (55%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_4&amp;gt;&lt;br/&gt;/ options = ("mindful", "normal", "opportunist", "outdoorsy", "peaceful", "planner", "quirky", "realistic",&lt;br/&gt;"relaxed", "reliable", "resilient", "responsible", "self-aware", "sociable", "spirited", "stable", &lt;br/&gt;"supportive", "thorough", "truthful", "understanding", "visionary", "well-mannered", "well-rounded", "wise", &lt;br/&gt;"risky", "self-absorbed", "shallow", "simple", "snobbish", "stressed", "stringent", "stupid", "tired", &lt;br/&gt;"typical", "unapproachable", "uncharming", "uncool", "unenergetic", "unexciting", "unimaginable", "unintellectual", "unintelligent", &lt;br/&gt;"uninteresting", "uninvolved", "unmotivated", "unorganized", "unoriginal", "unproductive", "unserious", "untalkative")&lt;br/&gt;/ position = (75%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text back&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;&amp;lt; Go Back")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;/ fontstyle = ("Arial", 3%, false, false, true, false, 5, 0)&lt;br/&gt;/ txcolor = blue&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial error_1&amp;gt;&lt;br/&gt;/ stimulusframes = [1=error, back]&lt;br/&gt;/ correctresponse = (back)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ branch = [if (trial.error_1.correctstreak &amp;gt;= 1) surveypage.X_traits_1]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="39959"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;&amp;gt; 1. There is a way to insert a live counter which would show the participant how many traits they've already selected. For example, if they've selected 10 traits so far the counter would show 10 on the screen. &lt;br/&gt;&lt;br/&gt;No.&lt;br/&gt;&lt;br/&gt;&amp;gt; 2. If not, then is there a way to make sure that the participants maintain their previously selected choices after viewing the error message? Right now, they see the error message, and are then routed back to the survey page, but lose all of their previous selections.&lt;br/&gt;&lt;br/&gt;Use a &amp;lt;survey&amp;gt; to run the page, not a &amp;lt;block&amp;gt;. That, however, means you'll have to use a &amp;lt;surveypage&amp;gt; to display the error message, not a &amp;lt;trial&amp;gt;.&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;surveypage X_traits_1&amp;gt;&lt;br/&gt;/ caption = "Choose 80 traits that best describe..."&lt;br/&gt;/ questions = [1 = X_traits_1; 2 = X_traits_2; 3 = X_traits_3; 4 = X_traits_4]&lt;br/&gt;/ nextbuttonposition = (75%, 260%)&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [if ((checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount) != 80) surveypage.error_1]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_1&amp;gt;&lt;br/&gt;/ options = ("smart", "funny", "friendly", "fun", "kind", "outgoing", "talented", "adventurous",&lt;br/&gt;"interesting", "nice", "driven", "social", "athletic", "creative", "extraverted", "hardworking",&lt;br/&gt;"involved", "honest", "organized", "caring", "independent", "open-minded", "positive", "thoughtful",&lt;br/&gt;"approachable",&lt;br/&gt;"careless", "boring", "disorganized", "rude", "lazy", "indecisive", "quiet", "pessimistic", "annoying",&lt;br/&gt;"dumb", "arrogant", "unfocused", "unfriendly", "impulsive", "selfish", "serious", "unsure", "weird",&lt;br/&gt;"basic", "distracted", "judgmental", "loud", "meek", "messy", "aloof", "antisocial", "awkward",&lt;br/&gt;"close-minded", "conceited", "crude")&lt;br/&gt;/ position = (15%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_2&amp;gt;&lt;br/&gt;/ options = ("brave", "calm", "carefree", "easygoing", "happy", "humble", "joyful", "motivated", "passionate",&lt;br/&gt;"analytical", "chill", "confident", "diligent", "engaged", "goal-focused", "loyal", "personable",&lt;br/&gt;"respectful", "studious", "well-spoken", "accepting", "accomplished", "active", "adaptable", "affable",&lt;br/&gt;"egocentric", "hasty", "immature", "impatient", "inconsistent", "insecure", "negative", "obnoxious", "overbearing",&lt;br/&gt;"regretful", "rigid", "try-hard", "vague", "bothered", "braggy", "busy", "chaotic", "cliquish",&lt;br/&gt;"cold", "competitive", "condescending", "confusing", "cowardly", "crazy", "cynical", "demeaning", "detached",&lt;br/&gt;"disrespectful", "distant", "ditzy")&lt;br/&gt;/ position = (35%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_3&amp;gt;&lt;br/&gt;/ options = ("amazing", "ambitious", "artistic", "aware", "balanced", "careful", "compassionate", "cultured",&lt;br/&gt;"curious", "deep-thinker", "descriptive", "direct", "eager", "engaging", "entertaining", "explorative",&lt;br/&gt;"future-focused", "genuine", "hardworker", "healthy", "interactive", "laid-back", "leader", "likeable",&lt;br/&gt;"mature",&lt;br/&gt;"dry", "dull", "eccentric", "fearful", "flustered", "foolish", "forgetful", "frivolous", "generic",&lt;br/&gt;"guarded", "hesitant", "ignorant", "inactive", "indifferent", "insincere", "intimidating", "introvert", "irresponsible",&lt;br/&gt;"irritating", "jealous", "kill-joy", "lonely", "nerdy", "one-dimensional", "overconfident", "overwhelmed", "overwhelming",&lt;br/&gt;"preoccupied", "reckless", "regular")&lt;br/&gt;/ position = (55%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_4&amp;gt;&lt;br/&gt;/ options = ("mindful", "normal", "opportunist", "outdoorsy", "peaceful", "planner", "quirky", "realistic",&lt;br/&gt;"relaxed", "reliable", "resilient", "responsible", "self-aware", "sociable", "spirited", "stable",&lt;br/&gt;"supportive", "thorough", "truthful", "understanding", "visionary", "well-mannered", "well-rounded", "wise",&lt;br/&gt;"risky", "self-absorbed", "shallow", "simple", "snobbish", "stressed", "stringent", "stupid", "tired",&lt;br/&gt;"typical", "unapproachable", "uncharming", "uncool", "unenergetic", "unexciting", "unimaginable", "unintellectual", "unintelligent",&lt;br/&gt;"uninteresting", "uninvolved", "unmotivated", "unorganized", "unoriginal", "unproductive", "unserious", "untalkative")&lt;br/&gt;/ position = (75%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage error_1&amp;gt;&lt;br/&gt;/ stimulusframes = [1=error]&lt;br/&gt;/ branch = [surveypage.X_traits_1]&lt;br/&gt;/ showbackbutton = false&lt;br/&gt;/ finishlabel = "Back"&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;survey example&amp;gt;&lt;br/&gt;/ pages = [1=surveypage.X_traits_1]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;[/code]&lt;a class="if-quote-goto quote-link" href="#" data-id="39960"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;This worked! Thank you.&lt;a class="if-quote-goto quote-link" href="#" data-id="39961"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;By the way, you can make the error message friendlier / more informative by including the number of traits currently selected.&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.&lt;br/&gt;(You currently have &amp;lt;%checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount%&amp;gt; selected.)")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;[/code]</description><pubDate>Tue, 29 Apr 2025 22:07:38 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Inserting a Live Checkbox Counter</title><link>https://forums.millisecond.com/Topic39961.aspx</link><description>&lt;blockquote data-id="39960" class="if-quote-wrapper" unselectable="on" data-guid="1745964022895" contenteditable="false" id="if_insertedNode_1745964022460"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39960" title=""&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39960" title=""&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39960" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39960"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;blockquote data-id="39959" class="if-quote-wrapper" unselectable="on" data-guid="1745964022895" contenteditable="false" id="if_insertedNode_1745953771641"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39959" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39959" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39959" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;vicki.rivera - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39959"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hello!&lt;br/&gt;I am designing a study where participants see a list of about 200 traits and have to select 80 in order to continue. I am using the checkboxes element so that they can make multiple selections. I also have the traits spread over 4 different checkboxes, so that I could create multiple columns. They are shown an error message if they do not select 80 traits. I wanted to know if:&lt;br/&gt;1. There is a way to insert a live counter which would show the participant how many traits they've already selected. For example, if they've selected 10 traits so far the counter would show 10 on the screen.&amp;nbsp;&lt;br/&gt;2. If not, then is there a way to make sure that the participants maintain their previously selected choices after viewing the error message? Right now, they see the error message, and are then routed back to the survey page, but lose all of their previous selections.&lt;br/&gt;I appreciate any advice! Here is the script which contains all of the relevant elements for this task:&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage X_traits_1&amp;gt;&lt;br/&gt;/ caption = "Choose 80 traits that best describe &amp;lt;%item.novelperson.item(values.personXnumber)%&amp;gt;..."&lt;br/&gt;/ questions = [1 = X_traits_1; 2 = X_traits_2; 3 = X_traits_3; 4 = X_traits_4]&lt;br/&gt;/ nextbuttonposition = (75%, 260%)&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [if ((checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount) != 80) trial.error_1]&lt;br/&gt;/ stimulusframes = [1=selectedcount1]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text selectedcount1&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount%&amp;gt;")&lt;br/&gt;/ position = (85%, 10%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_1&amp;gt;&lt;br/&gt;/ options = ("smart", "funny", "friendly", "fun", "kind", "outgoing", "talented", "adventurous",&lt;br/&gt;"interesting", "nice", "driven", "social", "athletic", "creative", "extraverted", "hardworking", &lt;br/&gt;"involved", "honest", "organized", "caring", "independent", "open-minded", "positive", "thoughtful", &lt;br/&gt;"approachable",&lt;br/&gt;"careless", "boring", "disorganized", "rude", "lazy", "indecisive", "quiet", "pessimistic", "annoying", &lt;br/&gt;"dumb", "arrogant", "unfocused", "unfriendly", "impulsive", "selfish", "serious", "unsure", "weird", &lt;br/&gt;"basic", "distracted", "judgmental", "loud", "meek", "messy", "aloof", "antisocial", "awkward", &lt;br/&gt;"close-minded", "conceited", "crude")&lt;br/&gt;/ position = (15%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_2&amp;gt;&lt;br/&gt;/ options = ("brave", "calm", "carefree", "easygoing", "happy", "humble", "joyful", "motivated", "passionate",&lt;br/&gt;"analytical", "chill", "confident", "diligent", "engaged", "goal-focused", "loyal", "personable", &lt;br/&gt;"respectful", "studious", "well-spoken", "accepting", "accomplished", "active", "adaptable", "affable", &lt;br/&gt;"egocentric", "hasty", "immature", "impatient", "inconsistent", "insecure", "negative", "obnoxious", "overbearing", &lt;br/&gt;"regretful", "rigid", "try-hard", "vague", "bothered", "braggy", "busy", "chaotic", "cliquish", &lt;br/&gt;"cold", "competitive", "condescending", "confusing", "cowardly", "crazy", "cynical", "demeaning", "detached", &lt;br/&gt;"disrespectful", "distant", "ditzy")&lt;br/&gt;/ position = (35%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_3&amp;gt;&lt;br/&gt;/ options = ("amazing", "ambitious", "artistic", "aware", "balanced", "careful", "compassionate", "cultured",&lt;br/&gt;"curious", "deep-thinker", "descriptive", "direct", "eager", "engaging", "entertaining", "explorative", &lt;br/&gt;"future-focused", "genuine", "hardworker", "healthy", "interactive", "laid-back", "leader", "likeable", &lt;br/&gt;"mature",&lt;br/&gt;"dry", "dull", "eccentric", "fearful", "flustered", "foolish", "forgetful", "frivolous", "generic", &lt;br/&gt;"guarded", "hesitant", "ignorant", "inactive", "indifferent", "insincere", "intimidating", "introvert", "irresponsible", &lt;br/&gt;"irritating", "jealous", "kill-joy", "lonely", "nerdy", "one-dimensional", "overconfident", "overwhelmed", "overwhelming", &lt;br/&gt;"preoccupied", "reckless", "regular")&lt;br/&gt;/ position = (55%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_4&amp;gt;&lt;br/&gt;/ options = ("mindful", "normal", "opportunist", "outdoorsy", "peaceful", "planner", "quirky", "realistic",&lt;br/&gt;"relaxed", "reliable", "resilient", "responsible", "self-aware", "sociable", "spirited", "stable", &lt;br/&gt;"supportive", "thorough", "truthful", "understanding", "visionary", "well-mannered", "well-rounded", "wise", &lt;br/&gt;"risky", "self-absorbed", "shallow", "simple", "snobbish", "stressed", "stringent", "stupid", "tired", &lt;br/&gt;"typical", "unapproachable", "uncharming", "uncool", "unenergetic", "unexciting", "unimaginable", "unintellectual", "unintelligent", &lt;br/&gt;"uninteresting", "uninvolved", "unmotivated", "unorganized", "unoriginal", "unproductive", "unserious", "untalkative")&lt;br/&gt;/ position = (75%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text back&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;&amp;lt; Go Back")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;/ fontstyle = ("Arial", 3%, false, false, true, false, 5, 0)&lt;br/&gt;/ txcolor = blue&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial error_1&amp;gt;&lt;br/&gt;/ stimulusframes = [1=error, back]&lt;br/&gt;/ correctresponse = (back)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ branch = [if (trial.error_1.correctstreak &amp;gt;= 1) surveypage.X_traits_1]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="39959"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;&amp;gt; 1. There is a way to insert a live counter which would show the participant how many traits they've already selected. For example, if they've selected 10 traits so far the counter would show 10 on the screen. &lt;br/&gt;&lt;br/&gt;No.&lt;br/&gt;&lt;br/&gt;&amp;gt; 2. If not, then is there a way to make sure that the participants maintain their previously selected choices after viewing the error message? Right now, they see the error message, and are then routed back to the survey page, but lose all of their previous selections.&lt;br/&gt;&lt;br/&gt;Use a &amp;lt;survey&amp;gt; to run the page, not a &amp;lt;block&amp;gt;. That, however, means you'll have to use a &amp;lt;surveypage&amp;gt; to display the error message, not a &amp;lt;trial&amp;gt;.&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;surveypage X_traits_1&amp;gt;&lt;br/&gt;/ caption = "Choose 80 traits that best describe..."&lt;br/&gt;/ questions = [1 = X_traits_1; 2 = X_traits_2; 3 = X_traits_3; 4 = X_traits_4]&lt;br/&gt;/ nextbuttonposition = (75%, 260%)&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [if ((checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount) != 80) surveypage.error_1]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_1&amp;gt;&lt;br/&gt;/ options = ("smart", "funny", "friendly", "fun", "kind", "outgoing", "talented", "adventurous",&lt;br/&gt;"interesting", "nice", "driven", "social", "athletic", "creative", "extraverted", "hardworking",&lt;br/&gt;"involved", "honest", "organized", "caring", "independent", "open-minded", "positive", "thoughtful",&lt;br/&gt;"approachable",&lt;br/&gt;"careless", "boring", "disorganized", "rude", "lazy", "indecisive", "quiet", "pessimistic", "annoying",&lt;br/&gt;"dumb", "arrogant", "unfocused", "unfriendly", "impulsive", "selfish", "serious", "unsure", "weird",&lt;br/&gt;"basic", "distracted", "judgmental", "loud", "meek", "messy", "aloof", "antisocial", "awkward",&lt;br/&gt;"close-minded", "conceited", "crude")&lt;br/&gt;/ position = (15%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_2&amp;gt;&lt;br/&gt;/ options = ("brave", "calm", "carefree", "easygoing", "happy", "humble", "joyful", "motivated", "passionate",&lt;br/&gt;"analytical", "chill", "confident", "diligent", "engaged", "goal-focused", "loyal", "personable",&lt;br/&gt;"respectful", "studious", "well-spoken", "accepting", "accomplished", "active", "adaptable", "affable",&lt;br/&gt;"egocentric", "hasty", "immature", "impatient", "inconsistent", "insecure", "negative", "obnoxious", "overbearing",&lt;br/&gt;"regretful", "rigid", "try-hard", "vague", "bothered", "braggy", "busy", "chaotic", "cliquish",&lt;br/&gt;"cold", "competitive", "condescending", "confusing", "cowardly", "crazy", "cynical", "demeaning", "detached",&lt;br/&gt;"disrespectful", "distant", "ditzy")&lt;br/&gt;/ position = (35%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_3&amp;gt;&lt;br/&gt;/ options = ("amazing", "ambitious", "artistic", "aware", "balanced", "careful", "compassionate", "cultured",&lt;br/&gt;"curious", "deep-thinker", "descriptive", "direct", "eager", "engaging", "entertaining", "explorative",&lt;br/&gt;"future-focused", "genuine", "hardworker", "healthy", "interactive", "laid-back", "leader", "likeable",&lt;br/&gt;"mature",&lt;br/&gt;"dry", "dull", "eccentric", "fearful", "flustered", "foolish", "forgetful", "frivolous", "generic",&lt;br/&gt;"guarded", "hesitant", "ignorant", "inactive", "indifferent", "insincere", "intimidating", "introvert", "irresponsible",&lt;br/&gt;"irritating", "jealous", "kill-joy", "lonely", "nerdy", "one-dimensional", "overconfident", "overwhelmed", "overwhelming",&lt;br/&gt;"preoccupied", "reckless", "regular")&lt;br/&gt;/ position = (55%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_4&amp;gt;&lt;br/&gt;/ options = ("mindful", "normal", "opportunist", "outdoorsy", "peaceful", "planner", "quirky", "realistic",&lt;br/&gt;"relaxed", "reliable", "resilient", "responsible", "self-aware", "sociable", "spirited", "stable",&lt;br/&gt;"supportive", "thorough", "truthful", "understanding", "visionary", "well-mannered", "well-rounded", "wise",&lt;br/&gt;"risky", "self-absorbed", "shallow", "simple", "snobbish", "stressed", "stringent", "stupid", "tired",&lt;br/&gt;"typical", "unapproachable", "uncharming", "uncool", "unenergetic", "unexciting", "unimaginable", "unintellectual", "unintelligent",&lt;br/&gt;"uninteresting", "uninvolved", "unmotivated", "unorganized", "unoriginal", "unproductive", "unserious", "untalkative")&lt;br/&gt;/ position = (75%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage error_1&amp;gt;&lt;br/&gt;/ stimulusframes = [1=error]&lt;br/&gt;/ branch = [surveypage.X_traits_1]&lt;br/&gt;/ showbackbutton = false&lt;br/&gt;/ finishlabel = "Back"&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;survey example&amp;gt;&lt;br/&gt;/ pages = [1=surveypage.X_traits_1]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;[/code]&lt;a class="if-quote-goto quote-link" href="#" data-id="39960"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;This worked! Thank you.</description><pubDate>Tue, 29 Apr 2025 22:00:47 GMT</pubDate><dc:creator>vicki.rivera</dc:creator></item><item><title>RE: Inserting a Live Checkbox Counter</title><link>https://forums.millisecond.com/Topic39960.aspx</link><description>&lt;blockquote data-id="39959" class="if-quote-wrapper" unselectable="on" data-guid="1745953772398" contenteditable="false" id="if_insertedNode_1745953771641"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="39959" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="39959" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="39959" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;vicki.rivera - 4/29/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-39959"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hello!&lt;br/&gt;I am designing a study where participants see a list of about 200 traits and have to select 80 in order to continue. I am using the checkboxes element so that they can make multiple selections. I also have the traits spread over 4 different checkboxes, so that I could create multiple columns. They are shown an error message if they do not select 80 traits. I wanted to know if:&lt;br/&gt;1. There is a way to insert a live counter which would show the participant how many traits they've already selected. For example, if they've selected 10 traits so far the counter would show 10 on the screen.&amp;nbsp;&lt;br/&gt;2. If not, then is there a way to make sure that the participants maintain their previously selected choices after viewing the error message? Right now, they see the error message, and are then routed back to the survey page, but lose all of their previous selections.&lt;br/&gt;I appreciate any advice! Here is the script which contains all of the relevant elements for this task:&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage X_traits_1&amp;gt;&lt;br/&gt;/ caption = "Choose 80 traits that best describe &amp;lt;%item.novelperson.item(values.personXnumber)%&amp;gt;..."&lt;br/&gt;/ questions = [1 = X_traits_1; 2 = X_traits_2; 3 = X_traits_3; 4 = X_traits_4]&lt;br/&gt;/ nextbuttonposition = (75%, 260%)&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [if ((checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount) != 80) trial.error_1]&lt;br/&gt;/ stimulusframes = [1=selectedcount1]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text selectedcount1&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount%&amp;gt;")&lt;br/&gt;/ position = (85%, 10%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_1&amp;gt;&lt;br/&gt;/ options = ("smart", "funny", "friendly", "fun", "kind", "outgoing", "talented", "adventurous",&lt;br/&gt;"interesting", "nice", "driven", "social", "athletic", "creative", "extraverted", "hardworking", &lt;br/&gt;"involved", "honest", "organized", "caring", "independent", "open-minded", "positive", "thoughtful", &lt;br/&gt;"approachable",&lt;br/&gt;"careless", "boring", "disorganized", "rude", "lazy", "indecisive", "quiet", "pessimistic", "annoying", &lt;br/&gt;"dumb", "arrogant", "unfocused", "unfriendly", "impulsive", "selfish", "serious", "unsure", "weird", &lt;br/&gt;"basic", "distracted", "judgmental", "loud", "meek", "messy", "aloof", "antisocial", "awkward", &lt;br/&gt;"close-minded", "conceited", "crude")&lt;br/&gt;/ position = (15%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_2&amp;gt;&lt;br/&gt;/ options = ("brave", "calm", "carefree", "easygoing", "happy", "humble", "joyful", "motivated", "passionate",&lt;br/&gt;"analytical", "chill", "confident", "diligent", "engaged", "goal-focused", "loyal", "personable", &lt;br/&gt;"respectful", "studious", "well-spoken", "accepting", "accomplished", "active", "adaptable", "affable", &lt;br/&gt;"egocentric", "hasty", "immature", "impatient", "inconsistent", "insecure", "negative", "obnoxious", "overbearing", &lt;br/&gt;"regretful", "rigid", "try-hard", "vague", "bothered", "braggy", "busy", "chaotic", "cliquish", &lt;br/&gt;"cold", "competitive", "condescending", "confusing", "cowardly", "crazy", "cynical", "demeaning", "detached", &lt;br/&gt;"disrespectful", "distant", "ditzy")&lt;br/&gt;/ position = (35%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_3&amp;gt;&lt;br/&gt;/ options = ("amazing", "ambitious", "artistic", "aware", "balanced", "careful", "compassionate", "cultured",&lt;br/&gt;"curious", "deep-thinker", "descriptive", "direct", "eager", "engaging", "entertaining", "explorative", &lt;br/&gt;"future-focused", "genuine", "hardworker", "healthy", "interactive", "laid-back", "leader", "likeable", &lt;br/&gt;"mature",&lt;br/&gt;"dry", "dull", "eccentric", "fearful", "flustered", "foolish", "forgetful", "frivolous", "generic", &lt;br/&gt;"guarded", "hesitant", "ignorant", "inactive", "indifferent", "insincere", "intimidating", "introvert", "irresponsible", &lt;br/&gt;"irritating", "jealous", "kill-joy", "lonely", "nerdy", "one-dimensional", "overconfident", "overwhelmed", "overwhelming", &lt;br/&gt;"preoccupied", "reckless", "regular")&lt;br/&gt;/ position = (55%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_4&amp;gt;&lt;br/&gt;/ options = ("mindful", "normal", "opportunist", "outdoorsy", "peaceful", "planner", "quirky", "realistic",&lt;br/&gt;"relaxed", "reliable", "resilient", "responsible", "self-aware", "sociable", "spirited", "stable", &lt;br/&gt;"supportive", "thorough", "truthful", "understanding", "visionary", "well-mannered", "well-rounded", "wise", &lt;br/&gt;"risky", "self-absorbed", "shallow", "simple", "snobbish", "stressed", "stringent", "stupid", "tired", &lt;br/&gt;"typical", "unapproachable", "uncharming", "uncool", "unenergetic", "unexciting", "unimaginable", "unintellectual", "unintelligent", &lt;br/&gt;"uninteresting", "uninvolved", "unmotivated", "unorganized", "unoriginal", "unproductive", "unserious", "untalkative")&lt;br/&gt;/ position = (75%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text back&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;&amp;lt; Go Back")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;/ fontstyle = ("Arial", 3%, false, false, true, false, 5, 0)&lt;br/&gt;/ txcolor = blue&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial error_1&amp;gt;&lt;br/&gt;/ stimulusframes = [1=error, back]&lt;br/&gt;/ correctresponse = (back)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ branch = [if (trial.error_1.correctstreak &amp;gt;= 1) surveypage.X_traits_1]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="39959"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;&amp;gt; 1. There is a way to insert a live counter which would show the participant how many traits they've already selected. For example, if they've selected 10 traits so far the counter would show 10 on the screen. &lt;br/&gt;&lt;br/&gt;No.&lt;br/&gt;&lt;br/&gt;&amp;gt; 2. If not, then is there a way to make sure that the participants maintain their previously selected choices after viewing the error message? Right now, they see the error message, and are then routed back to the survey page, but lose all of their previous selections.&lt;br/&gt;&lt;br/&gt;Use a &amp;lt;survey&amp;gt; to run the page, not a &amp;lt;block&amp;gt;. That, however, means you'll have to use a &amp;lt;surveypage&amp;gt; to display the error message, not a &amp;lt;trial&amp;gt;.&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;surveypage X_traits_1&amp;gt;&lt;br/&gt;/ caption = "Choose 80 traits that best describe..."&lt;br/&gt;/ questions = [1 = X_traits_1; 2 = X_traits_2; 3 = X_traits_3; 4 = X_traits_4]&lt;br/&gt;/ nextbuttonposition = (75%, 260%)&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [if ((checkboxes.X_traits_1.selectedcount + checkboxes.X_traits_2.selectedcount + checkboxes.X_traits_3.selectedcount + checkboxes.X_traits_4.selectedcount) != 80) surveypage.error_1]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_1&amp;gt;&lt;br/&gt;/ options = ("smart", "funny", "friendly", "fun", "kind", "outgoing", "talented", "adventurous",&lt;br/&gt;"interesting", "nice", "driven", "social", "athletic", "creative", "extraverted", "hardworking",&lt;br/&gt;"involved", "honest", "organized", "caring", "independent", "open-minded", "positive", "thoughtful",&lt;br/&gt;"approachable",&lt;br/&gt;"careless", "boring", "disorganized", "rude", "lazy", "indecisive", "quiet", "pessimistic", "annoying",&lt;br/&gt;"dumb", "arrogant", "unfocused", "unfriendly", "impulsive", "selfish", "serious", "unsure", "weird",&lt;br/&gt;"basic", "distracted", "judgmental", "loud", "meek", "messy", "aloof", "antisocial", "awkward",&lt;br/&gt;"close-minded", "conceited", "crude")&lt;br/&gt;/ position = (15%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_2&amp;gt;&lt;br/&gt;/ options = ("brave", "calm", "carefree", "easygoing", "happy", "humble", "joyful", "motivated", "passionate",&lt;br/&gt;"analytical", "chill", "confident", "diligent", "engaged", "goal-focused", "loyal", "personable",&lt;br/&gt;"respectful", "studious", "well-spoken", "accepting", "accomplished", "active", "adaptable", "affable",&lt;br/&gt;"egocentric", "hasty", "immature", "impatient", "inconsistent", "insecure", "negative", "obnoxious", "overbearing",&lt;br/&gt;"regretful", "rigid", "try-hard", "vague", "bothered", "braggy", "busy", "chaotic", "cliquish",&lt;br/&gt;"cold", "competitive", "condescending", "confusing", "cowardly", "crazy", "cynical", "demeaning", "detached",&lt;br/&gt;"disrespectful", "distant", "ditzy")&lt;br/&gt;/ position = (35%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_3&amp;gt;&lt;br/&gt;/ options = ("amazing", "ambitious", "artistic", "aware", "balanced", "careful", "compassionate", "cultured",&lt;br/&gt;"curious", "deep-thinker", "descriptive", "direct", "eager", "engaging", "entertaining", "explorative",&lt;br/&gt;"future-focused", "genuine", "hardworker", "healthy", "interactive", "laid-back", "leader", "likeable",&lt;br/&gt;"mature",&lt;br/&gt;"dry", "dull", "eccentric", "fearful", "flustered", "foolish", "forgetful", "frivolous", "generic",&lt;br/&gt;"guarded", "hesitant", "ignorant", "inactive", "indifferent", "insincere", "intimidating", "introvert", "irresponsible",&lt;br/&gt;"irritating", "jealous", "kill-joy", "lonely", "nerdy", "one-dimensional", "overconfident", "overwhelmed", "overwhelming",&lt;br/&gt;"preoccupied", "reckless", "regular")&lt;br/&gt;/ position = (55%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes X_traits_4&amp;gt;&lt;br/&gt;/ options = ("mindful", "normal", "opportunist", "outdoorsy", "peaceful", "planner", "quirky", "realistic",&lt;br/&gt;"relaxed", "reliable", "resilient", "responsible", "self-aware", "sociable", "spirited", "stable",&lt;br/&gt;"supportive", "thorough", "truthful", "understanding", "visionary", "well-mannered", "well-rounded", "wise",&lt;br/&gt;"risky", "self-absorbed", "shallow", "simple", "snobbish", "stressed", "stringent", "stupid", "tired",&lt;br/&gt;"typical", "unapproachable", "uncharming", "uncool", "unenergetic", "unexciting", "unimaginable", "unintellectual", "unintelligent",&lt;br/&gt;"uninteresting", "uninvolved", "unmotivated", "unorganized", "unoriginal", "unproductive", "unserious", "untalkative")&lt;br/&gt;/ position = (75%, 15%)&lt;br/&gt;/ order = random&lt;br/&gt;/ required = false&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("You must select 80 traits.")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage error_1&amp;gt;&lt;br/&gt;/ stimulusframes = [1=error]&lt;br/&gt;/ branch = [surveypage.X_traits_1]&lt;br/&gt;/ showbackbutton = false&lt;br/&gt;/ finishlabel = "Back"&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;survey example&amp;gt;&lt;br/&gt;/ pages = [1=surveypage.X_traits_1]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;[/code]</description><pubDate>Tue, 29 Apr 2025 19:21:11 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>