Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

xfa.layout.relayout(); not working properly on two of four fields

jeanette614
Level 4
Level 4

I have a contract that can be signed by four different departments with multiple people able to sign. I have used a text field where the signer can enter their name and have that name appear under the signature line, with their title.  I have used xfa.layout.relayout();  in the script, named the text field and it's appropriate output floating field the same, used global data binding and yet when I open the form in Acrobat, two of the fields work perfectly and the other two are giving me an error that they are expecting an integer and are showing a "1" in the text field and in the floating field below.

How can I fix this?

12 Replies
Niall_O_Donovan
Level 10
Level 10

Hi,

Of the other two objects, is one of them a numeric field or a decimal field?

Niall

jeanette614
Level 4
Level 4

They are all text fields but those two that aren't working correctly give the error that they are expecting an integer not text when I type in them. I compared everything about the fields that work against the fields that don't and they are identical. That's why I turned to the forum for help.

> Date: Tue, 5 Jul 2011 13:54:16 -0600

From: forums@adobe.com

To: jeanetteeichhorn@hotmail.com

Subject: xfa.layout.relayout(); not working properly on two of four fields

Hi,

Of the other two objects, is one of them a numeric field or a decimal field?

Niall

>

Niall_O_Donovan
Level 10
Level 10

Hi,

Without seeing the form it is difficult to say.

The only other thing I can think of, is that there may be conflicting script or display/edit/data patterns.

Niall

jeanette614
Level 4
Level 4

Please tell me how to post this form so you will be able to look at it and see why these two fields are expecting an integer. I even tried removing the fields and pasting in the ones that work and yet when I open it in Acrobat, a zero still appears in the fields.

I can't finish this form until these issues are resolved so please help.

Niall_O_Donovan
Level 10
Level 10

Hi,

You cannot upload files directly to the foums. However you can post your form to a file sharing site like Acrobat.com, publish it and then post the published URL here.

Acrobat.com publish.png

I will try and get to it when I can.

Niall

Niall_O_Donovan
Level 10
Level 10

Hi,

I don't have access to it. You need to specifically "publish" the form in Acrobat.com, so that I can use the link to access the file.

See screenshot above,

Niall

jeanette614
Level 4
Level 4

And if you could please take a look at the 458SPA that's also published. That's the one with the scripting problem where I don't want the fields to show a negative number. If the result of subtracting the Asset Disregards from the Total Assets creates a negative number, show a zero in that calculated field below it. We've tried several suggestions but it still didn't work.

I'm really good at showing zeros in text fields where people are supposed to type their names.....LOL

Thanks for any help you can offer.

Niall_O_Donovan
Level 10
Level 10

Hi,

Here is the form back to you: https://acrobat.com/#d=UJ5zuwofeqQ8siJKGhj2KA.

The main issue was that in two of the subforms, you have THREE objects with the same name (and global binding). Two were correct, the textfield and the floating field, but the third was a checkbox. Renaming the checkbox, solved the issue.

I also suggested moving two of the containers into page1 (which I named), where they show up in the hierarchy as subforms.

I can't see the other file. I would need to have the published URL. I am going to be out of the office tomorrow, so don't know when I would get a chance to look at it.

Hope that helps,

Niall

Niall_O_Donovan
Level 10
Level 10

Hi,

I was thinking about your problem and I think there is a simpler way.

At the moment you have two objects to achieve the effect, and a small script. You can achieve a similar effect by specifying a null pattern for a single textfield. You can add to the display pattern to cover when the user types in some data. eg null{}|text{}.

Sign 1.png

Sign 2.png

The advantages include one field, user sees one place for action and is not trying to fill in the floating field, and no script.

Here is an example (WIP): http://assure.ly/pZ5sOz.

Good luck,

Niall

jeanette614
Level 4
Level 4

Thank you so very much. I just couldn't see that I had done that and now it works perfectly.