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

Submit button problem

New Here ,
Feb 11, 2023 Feb 11, 2023

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
520
Translate
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

Please help anybody 

James28365060ucf2_0-1676136280665.pngexpand image

 

 

Translate
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

It looks ok. Are your fields set to required?

Translate
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

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

Translate
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
LATEST

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

 

Translate
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