Checkbox with password requirement
Hello,
We (my small team and I) trying to create a form where part is filled out be the applicant and then another part filled out be the "office reviewer". We have it set up so that the applicant can complete the form, then the review checks a box and new fields appear with instructions, areas that do calculations. etc.. This is all working great. When the check box is check everything that is need appears and when unchecked it goes away. The issue is we dont want the applicant to be able to check the box and see these instructions, as it could lead them to providing inaccurate information to ensure they meet specific eligibility criteria. So we thought of requiring a password when the box is checked and we have been able to get a password window to appear when you check the box ("Check box127"). The issue we are having is even with the password the content appears if its the right password, wrong, or user hits cancel. We know it's because the box is still checked regardless. I think we need an "if...then" scrip around the app script but have not been able to figure it out. Something that says if the password is entered correct then check the box, if entered incorrectly do not check the box and if canceled entereed do not check the box. Here is the script I am using for the password app (not the actual password though, we will change that):
var correctPassword = "1234";
resp = app.response("Enter the password:");
if (resp==null || resp!=correctPassword) getField("outside").setFocus();)
Any help is greatly appreciated. Our team is mostly new to Javascript. We have been pretty successful so far but we are all learning as we go.
