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

How do you make a required field accept zero(0) value?

Community Beginner ,
Apr 03, 2019 Apr 03, 2019

Hi Guys

I've designed a PDF form and have used a button to check all required fields are completed. The problem is the button won't accept any fields with a zero(0) amount. Is there any around this?

Thanks

TOPICS
Create PDFs
4.8K
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
1 ACCEPTED SOLUTION
Community Expert ,
Apr 05, 2019 Apr 05, 2019

Replace

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

with

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

nothing more

View solution in original post

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 Beginner ,
Jul 20, 2023 Jul 20, 2023
LATEST

You can ref here: https://nclvn.com/

NCL STORE - Siêu thị tiện ích thông minh
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 Beginner ,
Apr 04, 2019 Apr 04, 2019

What code does you use?

NCL STORE - Siêu thị tiện ích thông minh
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