{"id":4837,"date":"2024-11-09T03:57:26","date_gmt":"2024-11-09T03:57:26","guid":{"rendered":"https:\/\/beams-experiments.com\/?page_id=4837"},"modified":"2024-11-25T04:33:38","modified_gmt":"2024-11-25T04:33:38","slug":"pre-questionnaire-1-cce","status":"publish","type":"page","link":"https:\/\/beams-experiments.com\/index.php\/pre-questionnaire-1-cce\/","title":{"rendered":"Pre-Questionnaire-1-CCE"},"content":{"rendered":"\n<!DOCTYPE html>\n<html>\n<head>\n    <style>\n        #progressBarContainer {\n            width: 90%;\n            background-color: #e0e0e0;\n            border-radius: 5px;\n            margin-top: 20px;\n        }\n        #progressBar {\n            height: 10px;\n            background-color: #007bff;\n            border-radius: 5px;\n            width: 44%;\n        }\n        #progressText {\n            text-align: center;\n            margin-top: 5px;\n        }\n        #nextButton {\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: not-allowed;\n            opacity: 0.5;\n        }\n        #nextButton:enabled {\n            cursor: pointer;\n            opacity: 1;\n        }\n        .questionnaire {\n            margin: 20px;\n            text-align: left;\n        }\n        .questionnaire input,\n        .questionnaire select {\n            margin: 5px 0;\n        }\n        .radio-container {\n            display: flex;\n            flex-wrap: wrap;\n        }\n        .radio-container label {\n            margin-right: 10px;\n            margin-bottom: 5px;\n        }\nselect {\n    width: 100%;\n    padding: 8px;\n    font-size: 14px;\n    border: 1px solid #ccc;\n    border-radius: 4px;\n    margin-bottom: 15px;\n}\n    <\/style>\n<\/head>\n<body>\n\n    <!-- Questionnaire Section -->\n    <div class=\"questionnaire\">\n        <p><b>1. Age:<\/b> Please enter your age: <input type=\"number\" name=\"age\"><\/p>\n        <p><b>2. Gender:<\/b><\/p>\n        <label><input type=\"radio\" name=\"gender\" value=\"Male\"> Male<\/label>\n        <label><input type=\"radio\" name=\"gender\" value=\"Female\"> Female<\/label>\n        <label><input type=\"radio\" name=\"gender\" value=\"Other\"> Other<\/label>\n        <label><input type=\"radio\" name=\"gender\" value=\"Prefer not to say\"> Prefer not to say<\/label>\n        <p><b>3. Please select your highest level of education completed:<\/b><\/p>\n        <p>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"education\" value=\"Some High School\"> Some High School<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"education\" value=\"High School Graduate\"> High School Graduate<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"education\" value=\"Some College\"> Some College<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"education\" value=\"Associate's Degree\"> Associate&#8217;s Degree<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"education\" value=\"Bachelor\u2019s Degree\"> Bachelor\u2019s Degree<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"education\" value=\"Master\u2019s Degree\"> Master\u2019s Degree<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"education\" value=\"Doctorate or Higher\"> Doctorate or Higher<\/label>\n        <\/p>\n\n        <p><b>4. Please select your employment status:<\/b><\/p>\n        <p>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"employment\" value=\"Employed\"> Employed<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"employment\" value=\"Unemployed\"> Unemployed<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"employment\" value=\"Freelancer\"> Freelancer<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"employment\" value=\"Student\"> Student<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"employment\" value=\"Retired\"> Retired<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"employment\" value=\"Other\"> Other<\/label>\n        <\/p>\n        <p><b>5. Years of experience: How many years of professional experience do you have? <input type=\"number\" name=\"experience\"><\/b><\/p>\n\n<label for=\"role\"><b>6. Select your role:<\/b><\/label>\n<select id=\"role\" name=\"role\" required>\n    <option value=\"\">Select your role<\/option>\n    <option value=\"Account Management\">Account Management<\/option>\n    <option value=\"Administration\/Personal Assistant\">Administration \/ Personal Assistant<\/option>\n    <option value=\"Chemical\/Mechanical\/Electrical\/Civil Engineering\">Chemical \/ Mechanical \/ Electrical \/ Civil Engineering<\/option>\n    <option value=\"CX\/Customer Experience\/Support\">CX \/ Customer Experience \/ Support<\/option>\n    <option value=\"Data Analysis\">Data Analysis<\/option>\n    <option value=\"Design or Creative\">Design or Creative<\/option>\n    <option value=\"Healthcare Professional\">Healthcare Professional<\/option>\n    <option value=\"Education Professional\">Education Professional<\/option>\n    <option value=\"Engineering (e.g. software)\">Engineering (e.g. software)<\/option>\n    <option value=\"Finance or Accounting\">Finance or Accounting<\/option>\n    <option value=\"Fundraising\">Fundraising<\/option>\n    <option value=\"Human Resources\">Human Resources<\/option>\n    <option value=\"IT\/Information Networking\/Information Security\">IT \/ Information Networking \/ Information Security<\/option>\n    <option value=\"Legal\">Legal<\/option>\n    <option value=\"Marketing\">Marketing<\/option>\n    <option value=\"Operations\">Operations<\/option>\n    <option value=\"Product or Product Management\">Product or Product Management<\/option>\n    <option value=\"Project or Program Management\">Project or Program Management<\/option>\n    <option value=\"Public Relations\/Communications\">Public Relations \/ Communications<\/option>\n    <option value=\"Research\">Research<\/option>\n    <option value=\"Sales\/Business Development\">Sales \/ Business Development<\/option>\n    <option value=\"Other\">Other<\/option>\n<\/select>\n\n        <p><b>7. English Proficiency:<\/b><\/p>\n        <p>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"englishProficiency\" value=\"Native Speaker\"> Native Speaker<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"englishProficiency\" value=\"Fluent\"> Fluent<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"englishProficiency\" value=\"Proficient\"> Proficient<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"englishProficiency\" value=\"Intermediate\"> Intermediate<\/label>\n            <label style=\"margin-right: 10px;\"><input type=\"radio\" name=\"englishProficiency\" value=\"Beginner\"> Beginner<\/label>\n        <\/p> \n        \n        <p><b>Please answer questions 8-9 using a 1\u20137 scale, where 1 represents &#8216;not at all&#8217; and 7 represents &#8216;the highest&#8217;.<p><\/b>\n\n        <p><b>8. How familiar are you with AI tools?<\/b><br>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiFamiliarity\" value=\"1\"> 1<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiFamiliarity\" value=\"2\"> 2<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiFamiliarity\" value=\"3\"> 3<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiFamiliarity\" value=\"4\"> 4<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiFamiliarity\" value=\"5\"> 5<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiFamiliarity\" value=\"6\"> 6<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiFamiliarity\" value=\"7\"> 7<\/label>\n\n        <\/p>\n\n        <p><b>9. How often do you use AI tools at work?<\/b><br>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiUsage\" value=\"1\"> 1<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiUsage\" value=\"2\"> 2<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiUsage\" value=\"3\"> 3<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiUsage\" value=\"4\"> 4<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiUsage\" value=\"5\"> 5<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiUsage\" value=\"6\"> 6<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"aiUsage\" value=\"7\"> 7<\/label>\n\n        <\/p>\n\n\n\t\n \t<p><b>10. Please enter your Prolific ID <\/b><br>\n        <input type=\"text\" id=\"prolificID\" name=\"prolificID\">\n    <\/div>\n\n    <!-- Next Button -->\n    <button id=\"nextButton\" disabled>Next<\/button>\n\n    <!-- Progress Bar -->\n    <div id=\"progressBarContainer\">\n        <div id=\"progressBar\"><\/div>\n    <\/div>\n    <div id=\"progressText\">Page 4 out of 5<\/div>\n\n    <script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.5.1\/jquery.min.js\"><\/script>\n  <script>\n    \/\/ Declare taskSequence as a global variable\n    let taskSequence;\n    let taskIndex = 0;\n\n    $(document).ready(function() {\n        alert('Please fill in all the fields to proceed.');\n\n        function shuffle(array) {\n            for (let i = array.length - 1; i > 0; i--) {\n                const j = Math.floor(Math.random() * (i + 1));\n                [array[i], array[j]] = [array[j], array[i]];\n            }\n            return array;\n        }\n\n        const groupID = '1'; \/\/ Manually control groupID\n        localStorage.setItem('groupID', groupID); \/\/ Store it in local storage\n\n       \n\n        \/\/ Define mappings for education, employment, and englishProficiency\n        const educationMapping = {\n            \"Some High School\": 1,\n            \"High School Graduate\": 2,\n            \"Some College\": 3,\n            \"Associate's Degree\": 4,\n            \"Bachelor\u2019s Degree\": 5,\n            \"Master\u2019s Degree\": 6,\n            \"Doctorate or Higher\": 7\n        };\n\n        const employmentMapping = {\n            \"Employed\": 1,\n            \"Unemployed\": 2,\n            \"Freelancer\": 3,\n            \"Student\": 4,\n            \"Retired\": 5,\n            \"Other\": 6\n        };\n\n        const englishProficiencyMapping = {\n            \"Native Speaker\": 1,\n            \"Fluent\": 2,\n            \"Proficient\": 3,\n            \"Intermediate\": 4,\n            \"Beginner\": 5\n        };\n\n        const genderMapping = {\n            \"Male\": 1,\n            \"Female\": 2,\n            \"Other\": 3,\n            \"Prefer not to say\": 4\n        };\n\n        function checkFields() {\n            let allFilled = true;\n\n            \/\/ Check regular inputs and selects\n            $('.questionnaire input[type=\"number\"], .questionnaire textarea').each(function() {\n                if ($(this).val() === \"\" || $(this).val() === null) {\n                    allFilled = false;\n                    return false;\n                }\n            });\n\n            if (!allFilled) {\n                return false;\n            }\n\n            \/\/ Check radio button groups\n            $('.questionnaire input[type=\"radio\"]').each(function() {\n                if (!$('input[name=\"' + $(this).attr('name') + '\"]:checked').length) {\n                    allFilled = false;\n                    return false;\n                }\n            });\n\n            \/\/ Check Prolific ID\n            const prolificID = $('#prolificID').val();\n            if (prolificID === \"\") {\n                allFilled = false;\n            }\n    \/\/ Check role dropdown\n    const role = $('#role').val();\n    if (role === \"\" || role === null) { \/\/ Check if no valid option is selected\n        allFilled = false;\n    }\n            return allFilled;\n        }\n\n $('.questionnaire input, .questionnaire textarea, #role').on('change keyup', function () {\n    if (checkFields()) {\n        $('#nextButton').removeAttr('disabled').css('cursor', 'pointer').css('opacity', '1');\n    } else {\n        $('#nextButton').attr('disabled', 'disabled').css('cursor', 'not-allowed').css('opacity', '0.5');\n    }\n});\n      \n\n\n        $('#nextButton').on('click', function() {\n            \/\/ Capture responses\n            const prolificID = document.getElementById('prolificID').value;\n            if (prolificID === \"\") {\n                console.log('prolificID is missing');\n                return;\n            } else {\n                localStorage.setItem('prolificID', prolificID);\n                console.log('prolificID saved:', prolificID);\n            }\n\n            var age = $('[name=\"age\"]').val();\n            var gender = genderMapping[$('[name=\"gender\"]:checked').val()] || 0;\n            var education = educationMapping[$('[name=\"education\"]:checked').val()] || 0;\n            var employment = employmentMapping[$('[name=\"employment\"]:checked').val()] || 0;\n            var experience = $('[name=\"experience\"]').val();\n            var role = $('[name=\"role\"]').val();\n            var englishProficiency = englishProficiencyMapping[$('[name=\"englishProficiency\"]:checked').val()] || 0;\n\n            var aiFamiliarity = $('[name=\"aiFamiliarity\"]:checked').val();\n            var aiUsage = $('[name=\"aiUsage\"]:checked').val();\n            \n                      \n           \n\n            \/\/ Save data to local storage\n            localStorage.setItem('age', age);\n            localStorage.setItem('gender', gender.toString());\n            localStorage.setItem('education', education.toString());\n            localStorage.setItem('employment', employment.toString());\n            localStorage.setItem('experience', experience);\n            localStorage.setItem('role', role);\n            localStorage.setItem('englishProficiency', englishProficiency.toString());\n            localStorage.setItem('aiFamiliarity', aiFamiliarity);\n            localStorage.setItem('aiUsage', aiUsage);\n            \n          \n\n            \/\/ Redirect to the next page\n             window.location.href = 'https:\/\/beams-experiments.com\/index.php\/cce-questionnaire-antecedents-2';\n        });\n    });\n<\/script>\n\n\n<\/body>\n<\/html>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Age: Please enter your age: 2. Gender: Male Female Other Prefer not to say 3. Please select your highest level of education completed: Some High School High School Graduate Some College Associate&#8217;s Degree Bachelor\u2019s Degree Master\u2019s Degree Doctorate or Higher 4. Please select your employment status: Employed Unemployed Freelancer Student Retired Other 5. Years [&hellip;]<\/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-4837","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/4837","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=4837"}],"version-history":[{"count":22,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/4837\/revisions"}],"predecessor-version":[{"id":5383,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/4837\/revisions\/5383"}],"wp:attachment":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/media?parent=4837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}