By Libra - 6/26/2024
Hi, I have a script where I ask participants to make a choice on a multiple choice question. They are also given the option to select "Other (please specify)" and enter text. Later in the script, I want to pipe in their selected choice, or the entered text if participants select "Other (please specify)". Currently, the script I have pipe in "Other (please specify)" instead of the entered text. Could you please let me know how to pipe in what participants actually enter, if they select the option "Other (please specify)?" Thank you!
Attached is the script. I think the code relevant are lines 243-259. Thank you!
|
By Dave - 6/26/2024
+xHi, I have a script where I ask participants to make a choice on a multiple choice question. They are also given the option to select "Other (please specify)" and enter text. Later in the script, I want to pipe in their selected choice, or the entered text if participants select "Other (please specify)". Currently, the script I have pipe in "Other (please specify)" instead of the entered text. Could you please let me know how to pipe in what participants actually enter, if they select the option "Other (please specify)?" Thank you! Attached is the script. I think the code relevant are lines 243-259. Thank you! <surveypage chatGPT2> / skip = [ return (values.quit); ] / caption = "" / subcaption = "" / questions = [1 = AI] / showBackButton = false / onTrialEnd = [ values.AI = radiobuttons.AI.response; if (values.AI == "other"){ values.AI = textbox.AIOther.response; } else if (values.AI == ""){ values.quit = 1; //no responses (if allowed) should also terminate the script } ] / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / subcaptionfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / responsefontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) / showpagenumbers = false / showquestionnumbers = false / navigationbuttonfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / navigationbuttonsize = (15%, 5%) / nextbuttonposition = (70%, 90%) </surveypage>
is wrong and needs to read:
<surveypage chatGPT2> / skip = [ return (values.quit); ] / caption = "" / subcaption = "" / questions = [1 = AI] / showBackButton = false / onTrialEnd = [ values.AI = radiobuttons.AI.response; if (values.AI == "Other (please specify):"){ values.AI = textbox.AIOther.response; } else if (values.AI == ""){ values.quit = 1; //no responses (if allowed) should also terminate the script } ] / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / subcaptionfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / responsefontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) / showpagenumbers = false / showquestionnumbers = false / navigationbuttonfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / navigationbuttonsize = (15%, 5%) / nextbuttonposition = (70%, 90%) </surveypage>
|
By Libra - 6/26/2024
Got it! Thank you for your prompt help, Dave!
|
|