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

Change width of a field or using variables.... more help please

Community Beginner ,
Dec 07, 2019 Dec 07, 2019

I am trying to create an adobe letter with form fields in different places of a sentence. Sometimes the data going to the field will only be 1 or 2 characters while other times the data going to the field will be 8 or 10 characters. I want the field to auto size in width without changing the font to auto. The sentence needs to be uniform in font and spacing so that the sentence looks like it is written correctly. How can I create an auto sizing form field?

 

Below is an example of one of the sentences. I have inserted spaces where I would have form fields.

 

Dear _____________,

You will be come into _______ as _______ and your function will be ____________.

 

Can we use variables into a form and fill the variables with the content of the field.

 

or If I use a new global field and I will build it into a script. how can i use all HTML code to be sure that the text paragraph or sentence will be ok

 

 

I try to add the proposal into the form.

I create hidden fields dans make some calculated fields.

when à take the form into servicenow and I ask to generate the PDF files The fields are not calculated.

somebody can help me ?

thx !

TOPICS
PDF forms
1.7K
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 ,
Dec 07, 2019 Dec 07, 2019

This is not possible in Adobe Acrobat.

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
LEGEND ,
Dec 07, 2019 Dec 07, 2019

You can’t use HTML for anything. What you describe might not be completely impossible, but it’s so hard that it might as well be. 

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 ,
Dec 08, 2019 Dec 08, 2019

The only way to do that in an Acrobat PDF form is if the entire text is a part of a single text field.

It's possible to set up a system where you would enter those variable texts into a dialog window, or even other text fields in the files, and it will automatically populate this field with the full text. However, that requires the development of a custom-made script.

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 ,
Dec 08, 2019 Dec 08, 2019

Thx for your answer and support
I must to be creative and find another way to be able to have a fluent text.

I'm not allone to ask this functionality 🙂

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 ,
Dec 09, 2019 Dec 09, 2019

This script assumes that there are 4 text fields (name, into, as and function) containing data in the document, which can possibly be hidden.

Place it as a calculation script in the large multiline text field that hosts the final text:

 

var strWord1 = this.getField("name").valueAsString;
var strWord2 = this.getField("into").valueAsString;
var strWord3 = this.getField("as").valueAsString;
var strWord4 = this.getField("function").valueAsString;
event.target.value = "Dear " + strWord1 +",\nYou will be come into " + strWord2 + " as " + strWord3 + " and your function will be " + strWord4 + "."


Acrobate du PDF, InDesigner et Photoshopographe
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 ,
Dec 09, 2019 Dec 09, 2019

HI,

JR_BOULAY thx a lot for you help.

I will try it.

 

Philippe

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 ,
Dec 09, 2019 Dec 09, 2019

Hi JR_boulay,

 

I have a question 🙂

event.target.value=....

 

what do you mean by target ?

can i create calculated field (multiple line)

 

"computed text"

multiple line

and in the calulated tab (custom calculation)   (is it on the calulated tab ?

I put this script (without target)

 

var strWord1 = this.getField("name").valueAsString;
var strWord2 = this.getField("into").valueAsString;
var strWord3 = this.getField("as").valueAsString;
var strWord4 = this.getField("function").valueAsString;
event.value = "Dear " + strWord1 +",\nYou will be come into " + strWord2 + " as " + strWord3 + " and your function will be " + strWord4 + "."

 

THX !!!!

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 ,
Dec 09, 2019 Dec 09, 2019

It shoule be event.value, not event.target.value ...

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 ,
Dec 10, 2019 Dec 10, 2019

Yes, I'm sorry.

You can remove the "target" but it works fine in any case.

😉


Acrobate du PDF, InDesigner et Photoshopographe
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 ,
Dec 10, 2019 Dec 10, 2019
.l.
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 ,
Dec 17, 2019 Dec 17, 2019
LATEST

Thx it's really what I want to do

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