Ethics statement

  • 27th Sep 2025
  • Updated on 14th May 2025
Experiment element only

This documentation describes only one part of an experiment. For other tasks, see the related pages.

Ethics agreement

Before participating in the experiment, participants must agree to the ethics guidelines by checking a consent box. This section ensures that participants understand their rights and are willing to continue with the study.

Overview

Ethics agreement

The following part of the code handles the ethics agreement. The whole script consists of 2 parts:

  1. The sequence which contains only the "ethics" trial.
  2. The ethics agreement trial.

The ethics trial has several elements:

  1. An HTML page that displays the ethics explanation.
  2. A checkbox for participants to indicate their consent.
  3. A button for continuing to the next screen or trial, which becomes enabled only after the participant checks the consent box.

The .print() method displays both the ethics explanation and the button. The .wait() method pauses the experiment until the button is pressed.

// Sequence of events
Sequence("ethics")

// Ethics agreement: participants must agree before continuing
newTrial("ethics",
    newHtml("ethics_explanation", "ethics.html")
        .print()
    ,
        newHtml("form", `<div class="switch_box"><input name="consent" id='consent' type="checkbox" class="obligatory switch_1"> I want to participate.</div>`)
        .print()
        ,
    newFunction( () => $("#consent").change( e=>{
        if (e.target.checked) getButton("go_to_next_page").enable()._runPromises();
        else getButton("go_to_next_page").disable()._runPromises();
    }) ).call()
    ,
    newButton("go_to_next_page", "Start the experiment")
        .cssContainer({"margin-top":"1em", "margin-bottom":"1em"})
        .disable()
        .print()
        .wait()
);

Dependencies

  1. Resources
    • ethics.html
    • logo.png (optional)
  2. Scripts
    • main.js
  3. Aesthetics
    • global_main.css
    • PennController.css
  4. Modules
    • PennController.js
    • Form.js

Other modules and aesthetics may be necessary if your experiment uses other trials, e.g. a form for recording participant information.

The content of the ethics.html file can be adjusted to the requirements of the pertinent ethics committee. Click on Details to see the contents of the html file.

<html>
<head>
    <title>Linguistic experiment</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
    <center><img src="logo.png" alt="logo" width="100vw"></center>
    <h1>Ethics agreement</h1>
    <p>This is a demo of an ethics agreement for an experiment. It has a checkbox that participants need to click in order to proceed to the experiment.</p>

    <p>If you have any questions or problems, please contact <a href="https://pryslopska.com/">Anna Pryslopska</a> (<tt>anna.pryslopska [at] gmail .com</tt>).</p>
</html>

Running Code

To run the code, clone or download the content of the GitHub repository and copy it into a new empty project in your PCIbex farm. Alternatively, click on the demo link and copy the template.