Pipe in entered text


Author
Message
Libra
Libra
Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)
Group: Forum Members
Posts: 34, Visits: 142
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! 
Attachments
chatGPTSurvey.iqx (18 views, 19.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 101K
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! 

<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>
Libra
Libra
Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)Respected Member (456 reputation)
Group: Forum Members
Posts: 34, Visits: 142
Got it! Thank you for your prompt help, Dave! 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search