• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Submit button problem

New Here ,
Feb 11, 2023 Feb 11, 2023

Copy link to clipboard

Copied

var E_FieldName = [];
for (var i=0; i<this.numFields; i++) {

var f= this.getField(this.getNthFieldName(i));

if (f.type!="button" && f.required ) {

if ((f.type=="text" && f.value=="") || (f.type=="checkbox" && f.value=="Off")) E_FieldName.push(f.name);

}

}

if (E_FieldName.length>0) {

app.alert("Error! You must fill in the following fields:\n" + E_FieldName.join("\n"));

}

I get undefined, because of array

TOPICS
General troubleshooting , How to , PDF forms

Views

412

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 11, 2023 Feb 11, 2023

Copy link to clipboard

Copied

Please help anybody 

James28365060ucf2_0-1676136280665.png

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2023 Feb 11, 2023

Copy link to clipboard

Copied

It looks ok. Are your fields set to required?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2023 Feb 11, 2023

Copy link to clipboard

Copied

"undefined" is not an error. What do you expect to happen?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 11, 2023 Feb 11, 2023

Copy link to clipboard

Copied

LATEST

never mind I adjusted my code with some changes to make it work, thank you so much for all the replies

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines