{"id":17,"date":"2023-12-06T14:18:41","date_gmt":"2023-12-06T14:18:41","guid":{"rendered":"https:\/\/beams-experiments.com\/?page_id=17"},"modified":"2026-03-11T12:21:04","modified_gmt":"2026-03-11T12:21:04","slug":"informed-consent","status":"publish","type":"page","link":"https:\/\/beams-experiments.com\/index.php\/informed-consent\/","title":{"rendered":"Informed Consent"},"content":{"rendered":"\n<!DOCTYPE html>\n<html>\n<head>\n    <title>Your Website Title<\/title>\n    <style>\n        #progressBarContainer {\n            width: 90%; \/* Full width of the container *\/\n            background-color: #e0e0e0; \/* Light grey background *\/\n            border-radius: 5px; \/* Rounded corners *\/\n            margin-top: 20px; \/* Space above the progress bar *\/\n        }\n\n        #progressBar {\n            height: 10px; \/* Height of the progress bar *\/\n            background-color: #007bff; \/* Blue progress bar *\/\n            border-radius: 5px; \/* Rounded corners *\/\n            width: 50%; \/* Represents the progress (3\/6 = 50%) *\/\n        }\n\n        #progressText {\n            text-align: center;\n            margin-top: 5px; \/* Space between the progress bar and the text *\/\n        }\n\n        #agreeButton {\n            display: block;\n            background-color: #007bff;\n            color: white;\n            padding: 10px 20px;\n            margin: 20px auto;\n            font-size: 16px;\n            border: none;\n            border-radius: 5px;\n            cursor: pointer;\n            \/* Initially disable the button *\/\n            opacity: 0.5;\n            cursor: not-allowed;\n        }\n    <\/style>\n    <script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.5.1\/jquery.min.js\"><\/script>\n    <script>\n    $(document).ready(function() {\n        var groupID = localStorage.getItem('groupID');\n\n        \/\/ Remove the alert as requested\n        $.ajax({\n            url: 'https:\/\/beams-experiments.com\/getInformedConsent.php',\n            type: 'GET',\n            success: function(data) {\n                var formattedData = formatTextToParagraphs(data);\n                $('#result').html(formattedData);\n            },\n            error: function() {\n                $('#result').html('Error loading data.');\n            }\n        });\n\n        function formatTextToParagraphs(text) {\n            var paragraphs = text.split(\/\\n+\/); \n            var formattedText = paragraphs.map(function(paragraph) {\n                return '<p>' + paragraph + '<\/p>'; \n            }).join('');\n            return formattedText;\n        }\n\n        \/\/ Disable the button initially\n        $('#agreeButton').prop('disabled', true);\n\n        \/\/ Enable button when \"I agree\" radio button is checked\n        $('input[name=\"consent\"]').on('change', function() {\n            if ($('#agree').is(':checked')) {\n                $('#agreeButton').prop('disabled', false);\n                $('#agreeButton').css('opacity', '1');\n                $('#agreeButton').css('cursor', 'pointer');\n            } else {\n                $('#agreeButton').prop('disabled', true);\n                $('#agreeButton').css('opacity', '0.5');\n                $('#agreeButton').css('cursor', 'not-allowed');\n            }\n        });\n\n        $('#agreeButton').on('click', function() {\n           \n                window.location.href = 'https:\/\/beams-experiments.com\/index.php\/questionnaire\/';\n            \n            \n        });\n    });\n    <\/script>\n<\/head>\n<body>\n    <div id=\"result\">Loading data&#8230;<\/div>\n\n    <!-- Radio Buttons -->\n    <div>\n        <label>\n            <input type=\"radio\" name=\"consent\" id=\"disagree\" checked> I don&#8217;t agree with the terms of the experiment\n        <\/label>\n        <br>\n        <label>\n            <input type=\"radio\" name=\"consent\" id=\"agree\"> I agree with the terms of the experiment\n        <\/label>\n    <\/div>\n\n    <!-- Agree & Continue Button -->\n    <button id=\"agreeButton\">Agree &#038; Continue<\/button>\n\n    <!-- Progress Bar -->\n    <div id=\"progressBarContainer\">\n        <div id=\"progressBar\"><\/div>\n    <\/div>\n    <div id=\"progressText\">Page 3 out of 6<\/div>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Your Website Title Loading data&#8230; I don&#8217;t agree with the terms of the experiment I agree with the terms of the experiment Agree &#038; Continue Page 3 out of 6<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"footnotes":""},"class_list":["post-17","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":17,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/17\/revisions"}],"predecessor-version":[{"id":6416,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/17\/revisions\/6416"}],"wp:attachment":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/media?parent=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}