﻿<?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  » error message by the response sum of multiple textbox questions</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sun, 05 Apr 2026 21:03:53 GMT</lastBuildDate><ttl>20</ttl><item><title>error message by the response sum of multiple textbox questions</title><link>https://forums.millisecond.com/Topic34858.aspx</link><description>Hi,&lt;br/&gt;I am trying to construct a surveypage in which participants receive multiple answer options per question and have to bet probability points on each answer option ("how likely the response is"). I want them to place probability points across three options with 100 points in total.&lt;br/&gt;I was trying to construct it in a way that if the sum of the points across the three options differ from 100, they get an error message. However, this code is not working. I am attaching it below.&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox before&amp;gt;&lt;br/&gt;/ caption = "before"&lt;br/&gt;/ range = (0,100)&lt;br/&gt;/ required = true&lt;br/&gt;/ position = (10%, 15%)&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox during&amp;gt;&lt;br/&gt;/ caption = "during"&lt;br/&gt;/ range = (0,100)&lt;br/&gt;/ required = true&lt;br/&gt;/ position = (40%, 15%)&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox after&amp;gt;&lt;br/&gt;/ caption = "after"&lt;br/&gt;/ range = (0,100)&lt;br/&gt;/ required = true&lt;br/&gt;/ position = (70%, 15%)&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("This does not add up to 100!")&lt;br/&gt;/ position = (49%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)&lt;br/&gt;/ vjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial error&amp;gt;&lt;br/&gt;/ stimulusframes = [1= error]&lt;br/&gt;/ timeout = 1000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage pg01&amp;gt;&lt;br/&gt;/ questions = [1=before; 2=during; 3=after]&lt;br/&gt;/ caption = "When was it?"&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [&lt;br/&gt;&amp;nbsp; if ((textbox.before.response + textbox.after.response + textbox.during.response) != 100) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  trial.error&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;I would greatly appreciate any help on this matter. Thanks in advance&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 18 Oct 2022 13:44:50 GMT</pubDate><dc:creator>SWIECHE</dc:creator></item><item><title>RE: error message by the response sum of multiple textbox questions</title><link>https://forums.millisecond.com/Topic34859.aspx</link><description>&lt;blockquote data-id="34858" class="if-quote-wrapper" unselectable="on" data-guid="1666100570481" id="if_insertedNode_1666100570122" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="34858" 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="34858" 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="34858" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;SWIECHE - 10/18/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-34858"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi,&lt;br/&gt;I am trying to construct a surveypage in which participants receive multiple answer options per question and have to bet probability points on each answer option ("how likely the response is"). I want them to place probability points across three options with 100 points in total.&lt;br/&gt;I was trying to construct it in a way that if the sum of the points across the three options differ from 100, they get an error message. However, this code is not working. I am attaching it below.&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox before&amp;gt;&lt;br/&gt;/ caption = "before"&lt;br/&gt;/ range = (0,100)&lt;br/&gt;/ required = true&lt;br/&gt;/ position = (10%, 15%)&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox during&amp;gt;&lt;br/&gt;/ caption = "during"&lt;br/&gt;/ range = (0,100)&lt;br/&gt;/ required = true&lt;br/&gt;/ position = (40%, 15%)&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox after&amp;gt;&lt;br/&gt;/ caption = "after"&lt;br/&gt;/ range = (0,100)&lt;br/&gt;/ required = true&lt;br/&gt;/ position = (70%, 15%)&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("This does not add up to 100!")&lt;br/&gt;/ position = (49%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)&lt;br/&gt;/ vjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial error&amp;gt;&lt;br/&gt;/ stimulusframes = [1= error]&lt;br/&gt;/ timeout = 1000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage pg01&amp;gt;&lt;br/&gt;/ questions = [1=before; 2=during; 3=after]&lt;br/&gt;/ caption = "When was it?"&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [&lt;br/&gt;&amp;nbsp; if ((textbox.before.response + textbox.after.response + textbox.during.response) != 100) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  trial.error&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;I would greatly appreciate any help on this matter. Thanks in advance&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="34858"&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;[code]&amp;lt;textbox before&amp;gt;&lt;br/&gt;/ caption = "before"&lt;br/&gt;/ range = (0,100)&lt;br/&gt;/ required = true&lt;br/&gt;/ position = (10%, 15%)&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox during&amp;gt;&lt;br/&gt;/ caption = "during"&lt;br/&gt;/ range = (0,100)&lt;br/&gt;/ required = true&lt;br/&gt;/ position = (40%, 15%)&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox after&amp;gt;&lt;br/&gt;/ caption = "after"&lt;br/&gt;/ range = (0,100)&lt;br/&gt;/ required = true&lt;br/&gt;/ position = (70%, 15%)&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text error&amp;gt;&lt;br/&gt;/ items = ("This does not add up to 100!")&lt;br/&gt;/ position = (49%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)&lt;br/&gt;/ vjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial error&amp;gt;&lt;br/&gt;/ stimulusframes = [1= error]&lt;br/&gt;/ timeout = 1000&lt;br/&gt;/ branch = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;surveypage.pg01;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage pg01&amp;gt;&lt;br/&gt;/ questions = [1=before; 2=during; 3=after]&lt;br/&gt;/ caption = "When was it?"&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ branch = [&lt;br/&gt;  if ((textbox.before.response + textbox.after.response + textbox.during.response) != 100) {&lt;br/&gt;&amp;nbsp;trial.error&lt;br/&gt;  }&lt;br/&gt;]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block example&amp;gt;&lt;br/&gt;/ trials = [1=pg01]&lt;br/&gt;&amp;lt;/block&amp;gt;[/code]&lt;br/&gt;&lt;br/&gt;It's working just fine. Note that you need to at least define a block, a branch cannot be executed outside the context of a block.&lt;br/&gt;</description><pubDate>Tue, 18 Oct 2022 13:44:50 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>