• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

ADOBE ACROBAT PRO, set minimum word count in textfield

New Here ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

Hi All,

I am creating a form in Adobe Acrobat Pro. I want to set a minimum number of words (50) in a text field named 'Business Description'

I want also to make sure that before saving the form user either wrote 50+ words in that field or that filed has not been completed at all (0 words).

Can I apply those restrictions using JavaSpript? Your help is very much appreciated.

EMil

TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.1K

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

You can't prevent the file from being saved. It is possible to show an

error message, though.

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

Many thanks for your reply. Do you have any other suggestions on how to enforce someone to type at least 50 words in a specific textfield?

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

Define "enforce"...

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

I am sending out forms to be completed by different people and I don't want any form to have less than 50 words in a specific textfield (which is basically kind of business description). So I want to have some kind of strategy to guarantee above.

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

Are the files being submitted back to you via email?

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

Not, they are printing and sending hard copies!

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

In that case the only option I see is to include a large visible warning on the page itself, letting the user know the file will not be accepted in its current state.

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

Is it possible to disable printing if the word limit is not met?

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

No. It is possible to force the printed copy to not contain any filled-in information at all, though.

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

Many thanks, for your help, very much appreciated!

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

You can achieve the warning text by applying the following code as the custom calculation script of a text field:

var s = this.getField("Business Description").valueAsString;

var words = s.replace(/\r/g, " ").split(" ");

event.value = (words.length<50) ? "ERROR! The \"Business Description\" field is not properly filled in. You must enter at least 50 words." : "";

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 ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

LATEST

Thank you very much!

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