Skip to main content
ramini61051153
Participant
May 15, 2019
Question

Password protect Submit button

  • May 15, 2019
  • 2 replies
  • 1334 views

hi,

I created a fillable form with two submit “email“ buttons. I’d like to password protect the second button to be used by a dedicated group who know the password to review, date and submit using JavaScript. Can someone help me with that? Thank you   

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
May 15, 2019

TSN is correct. This can be done using JS but is very insecure, as the password has to be saved into the script itself.

The basic code to do it would be:

if (app.response("Enter the password", "", "")=="ABCD") this.mailDoc({cTo: "me@company.com"});

Participant
June 30, 2023

Sorry, i know is been a while since you answer this question. But if you dont mind me asking, how do you go about asking for input from the user?

 

Legend
May 15, 2019

You can make the script put out a prompt and check what is typed. It won’t be secure, an informed person could read the JavaScript quickly and easily, and so see the password.