Skip to main content
Known Participant
October 20, 2021
Answered

Set a password when select already entered value from dropdown in fillable from in Adobe Acrobat DC.

  • October 20, 2021
  • 2 replies
  • 3077 views

Hi, 
I'd like to ask about fillable form. I have a pdf form with dropdowns (the dropdown contains already entered values) I want a javascript to create and request a password when select (value A) different from password when select (value B).

This topic has been closed for replies.
Correct answer Nesa Nurani

Thank you very much that's done.

 

The last question: I would to showing asteriks when entering password.


You can use like this:

app.response({cQuestion:"Please enter password1",cTitle:"",bPassword:true});

2 replies

Nesa Nurani
Community Expert
Community Expert
October 20, 2021

You can use app.response to get password input.

Lets say you have 3 values in dropdown field ("---","Value1","Value2")

"---" being default value, if user select "Value1" and enter incorrect password it would set field to default value.

As Custom calculation script of dropdown field use this:

if(event.value == "Value1"){
var pass = app.response("Please enter password");
if(pass != "Password1")
event.target.currentValueIndices = [0];}
else if(event.value == "Value2"){
var pass2 = app.response("Please enter password");
if(pass2 != "Password2")
event.target.currentValueIndices = [0];}

In dropdown field properties -> options tab, tick 'Commit selected value immediatelly'.

Change passwords and values to your actual values.

There are also other options for app.response like showing asteriks when entering password.

NPH CoAuthor
Known Participant
October 20, 2021

almost done, but when the file closed and re-opening it  the password command apper again. why?

Inspiring
October 20, 2021

And what should that password do?

NPH CoAuthor
Known Participant
October 20, 2021

To allow select the value from a specific person who have a password already but not all person