Openended Trial


Author
Message
huanzhong
huanzhong
New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)
Group: Forum Members
Posts: 3, Visits: 8
I don't know if this has been answered.   How do I confirm no response in text box of an openeded element before continuing?  I don't want to turn required to true but do want to confirm that they had entered nothing in the text box.
Thanks.
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: 13K, Visits: 102K
huanzhong - 2/21/2024
I don't know if this has been answered.   How do I confirm no response in text box of an openeded element before continuing?  I don't want to turn required to true but do want to confirm that they had entered nothing in the text box.
Thanks.

What do you mean by "confirm"?
huanzhong
huanzhong
New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)
Group: Forum Members
Posts: 3, Visits: 8
Dave - 2/21/2024
huanzhong - 2/21/2024
I don't know if this has been answered.   How do I confirm no response in text box of an openeded element before continuing?  I don't want to turn required to true but do want to confirm that they had entered nothing in the text box.
Thanks.

What do you mean by "confirm"?

Sorry.  So when they click continue button in the openeded element block, I want to be able to have a pop up message box that informed the participants that they had entered nothing in the text box, and do they want to continue with that or go back and enter something.  If that makes sense?
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: 13K, Visits: 102K
huanzhong - 2/21/2024
Dave - 2/21/2024
huanzhong - 2/21/2024
I don't know if this has been answered.   How do I confirm no response in text box of an openeded element before continuing?  I don't want to turn required to true but do want to confirm that they had entered nothing in the text box.
Thanks.

What do you mean by "confirm"?

Sorry.  So when they click continue button in the openeded element block, I want to be able to have a pop up message box that informed the participants that they had entered nothing in the text box, and do they want to continue with that or go back and enter something.  If that makes sense?

Then you need to do some branching.

<openended exampleOpenended>
/ stimulusframes = [1=text.exampleText]
/ branch = [
    if (openended.exampleOpenended.responsetext == "") {
        return trial.emptyResponse;
    }
]
</openended>

<trial emptyResponse>
/ stimulusframes = [1=text.emptyResponseText, button.returnButton, button.continueButton]
/ inputdevice = mouse
/ validresponse = (button.returnButton, button.continueButton)
/ branch = [
    if (trial.emptyResponse.responsetext == "returnButton") {
        return openended.exampleOpenended;
    }
]
</trial>

<text exampleText>
/ items = ("Enter something or nothing at all")
/ position = (50%, 40%)
</text>

<text emptyResponseText>
/ items = ("You didn't enter anything. Do you want to return to revise your response or continue?")
</text>

<button returnButton>
/ caption = "Return"
/ position = (30%, 75%)
/ size = (15%, 5%)
</button>

<button continueButton>
/ caption = "Continue"
/ position = (70%, 75%)
/ size = (15%, 5%)
</button>

<block exampleBlock>
/ trials = [1=openended.exampleOpenended]
</block>



huanzhong
huanzhong
New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)
Group: Forum Members
Posts: 3, Visits: 8
Thank you very much.  works perfectly
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search