Skip to main content
Participating Frequently
Dec 4, 2020 6:38 AM UTC
Answered

Hiding the submit button until all required fields are filled out

This should be pretty straight forward I think but I'm having a difficult time finding the correct answer for what I want.

I have six fields on a PDF form, I want the submit button to remain hidden until all six fields are not blank, then change to visible.

I've tried different IF AND statements and just not getting it to work. Using Adobe Acrobat DC. 

Thanks for advice.

This topic is closed to new replies. Start a new post to keep the conversation going.
Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
Dec 4, 2020 3:45 PM UTC

Change " " to "" whitout space and change visble to visible.

6 replies

try67
Community Expert
Community Expert
Dec 4, 2020 9:21 AM UTC

Also, where did you place the code you used?

Translate
Participating Frequently
Dec 4, 2020 3:32 PM UTC

I have this code located in the Custom Calculation Script box in another hidden field.

Translate
Bernd Alheit
Community Expert
Community Expert
Dec 4, 2020 7:30 AM UTC

What have you tried?

Translate
Participating Frequently
Dec 4, 2020 3:31 PM UTC

In this one, I wanted a "results" field to display only when all 6 fields were field out. I tried something simliar for the button too. I have this code located in the Custom Calculation Script box in a hidden field since the "results" field has something else in it for displaying results.

var nameData = this.getField("Name").value;
var vehicleData= this.getField("Vehicle").value;
var premiumData = this.getField("Premium Increase").value;
var pmilesData = this.getField("Previous Miles").value;
var cmilesData = this.getField("Current Miles").value;
var dateData = this.getField("Renewal Date").value;

if(nameData != " " && vehicleData != " " && premiumData != " " && pmilesData != " " && cmilesData != " " && dateData != " "){
    this.getField("results").display = display.visble;
}
else {
this.getField("results").display = display.hidden;
}

 

Translate
Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
Dec 4, 2020 3:45 PM UTC

Change " " to "" whitout space and change visble to visible.

Translate