Combining something with an html


Author
Message
amanuel2
amanuel2
New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)
Group: Forum Members
Posts: 3, Visits: 21
Hello!

I am working on making a consent form and I'm using the HTML function. I want to add to the same page with the HTML an option to accept or deny the consent.
Right now I have the HTML consent form on one page, and another with the option to accept or deny. Is there a way I can have them both on the same page so the accept or deny will just be at the end of the consent HTML file?
I've posted my code below.

<html consent1>
/ items = ("consent.html")
/ size = (100% ,100%)
</html>

<trial consent1>
/ stimulusframes = [1=consent1]
/ validresponse = (57)
</trial>


<text consent2>
/ items = ("By clicking “YES”, you are indicating that you fully understand the previous information and agree to participate in this study.")
/ size = (80%, 10%)
/ vjustify = center
</text>


<text agree>
/items = ("Yes, I agree to particpate.")
/position = (25%, 70%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = (black)
/txbgcolor = (white)
/size = (30%, 20%)
/ vjustify = center
</text>

<text disagree>
/items = ("No, exit the study.")
/position = (75%, 70%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = (black)
/txbgcolor = (white)
/size = (30%, 20%)
/vjustify = center
</text>

<trial Consent2>
/inputdevice = mouse
/stimulusframes = [1 = consent2, agree, disagree]
/validresponse = (agree, disagree)
/monkeyresponse = ("agree")
/ontrialend = [if (trial.Consent2.response == "disagree") script.abort()]
</trial>

<block myblock>
/ trials = [
    1 = consent1, consent2
]
</block>
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: 98K
amanuel2 - 3/2/2021
Hello!

I am working on making a consent form and I'm using the HTML function. I want to add to the same page with the HTML an option to accept or deny the consent.
Right now I have the HTML consent form on one page, and another with the option to accept or deny. Is there a way I can have them both on the same page so the accept or deny will just be at the end of the consent HTML file?
I've posted my code below.

<html consent1>
/ items = ("consent.html")
/ size = (100% ,100%)
</html>

<trial consent1>
/ stimulusframes = [1=consent1]
/ validresponse = (57)
</trial>


<text consent2>
/ items = ("By clicking “YES”, you are indicating that you fully understand the previous information and agree to participate in this study.")
/ size = (80%, 10%)
/ vjustify = center
</text>


<text agree>
/items = ("Yes, I agree to particpate.")
/position = (25%, 70%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = (black)
/txbgcolor = (white)
/size = (30%, 20%)
/ vjustify = center
</text>

<text disagree>
/items = ("No, exit the study.")
/position = (75%, 70%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = (black)
/txbgcolor = (white)
/size = (30%, 20%)
/vjustify = center
</text>

<trial Consent2>
/inputdevice = mouse
/stimulusframes = [1 = consent2, agree, disagree]
/validresponse = (agree, disagree)
/monkeyresponse = ("agree")
/ontrialend = [if (trial.Consent2.response == "disagree") script.abort()]
</trial>

<block myblock>
/ trials = [
    1 = consent1, consent2
]
</block>

> Is there a way I can have them both on the same page so the accept or deny will just be at the end of the consent HTML file?

Yes, of course. /size and /position the <html> element so that it doesn't take up the entire screen, then display everything in a single <trial>.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search