You need to add this code to your layout and change the curPath value to match the page you want to run it on.

Here's the sample codes:

<script type="text/javascript">
var pw = 'ABC123';
if (curPath=='survey_group.aspx' && getCookie('protected') != pw) {
window.setTimeout(function() {
var val = window.prompt("Please enter the passcode to continue applying.","");
if (val == pw) {
setCookie('protected', val, 30);
} else {
alert("Sorry, wrong value.");
window.location.href = window.location;
}, 200)

Did this answer your question?