Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Trying to link text boxes

Avatar

Former Community Member
Hey there.... I'm new to using Livecycle. What I have is a form that we fill out with new clients. It was scanned in as a pdf and I've placed text boxes where you would normally hand fill it out. There are several different places where it asks for first and last name, birthday, etc. I was trying to find out how to make it so when you fill in the name once, it automatically fills it into everything other name text box.

This may be something really simple, but I've never used this before and can't seem to find out how!
9 Replies

Avatar

Former Community Member
Make sure all of th efields have the same name, then in the binding tab (on the object palette) change the binding to Global. Then when one field changes all of the fields with the same name will change also.

Avatar

Former Community Member
Is there also a way to do it via script? :)

Only in case :)

Avatar

Former Community Member
You could assign the value to any field you want. They do not even have to be the same name. Assuming javascipt you can add code like this to the exit event of the name field.



OtherField1Name.rawValue = this.rawValue;

OtherField2Name.rawValue = this.rawValue;

Avatar

Former Community Member
I'm silly again :)

I already tried this script, before you've written it... but in calculated fields, so I never exited them ;D (and wondered why this script didn't work)

Well have a solution already... (just calculate it for the "otherbinded" fields in the wrong way)



I really should sleep over it before asking.

Avatar

Former Community Member
Might sound silly (again... okey I am a stupid person), but got another problem with this simple matter. Is it possible to do such a copy (with script) between two fields in two different subforms?



So: one form, with two subforms, one field in each, and both fields with different "bindings" but the same rawValue's.



(Thought already about making invisible fields in both subforms with the same binding as the field in the other subform. But most likly there is a more elegant method.)

Avatar

Former Community Member
You merely need to have the complete path to the field when you reference it...something like this:



form1.Page1.subform1.TextField1.rawValue = form1.Page1.subform2.TextField2.rawValue

Avatar

Former Community Member
Already tried this.

Didn't work :(



Formular1.#subform[0].#subform[1].Textfeld1::exit - (JavaScript, client)



if (this.rawValue != null)

{

Formular1.subform[0].subform[2].Textfeld2.rawValue = Formular1.subform[0].subform[1].Textfeld1.rawValue;

}

else

{Formular1.subform[0].subform[2].Textfeld2.rawValue = "nothing entered";}

Avatar

Former Community Member
You have not named your subforms so they should not appear in the Som Expression. I woudl suggest naming them (it will make it easier when you build the expression as the object assist in the scritp editor will allow you to pick them.



On a separate note you can see what the full expression will be by coding this javascript command on the exit event of the field in question:



app.alert(this.somExpression);



This will display the Somexpression required to address this field in a messageBox when you exit the field. Once you have the expression remove the command as it is only for your benefit and does nothing for the user.

Avatar

Former Community Member
finally... finally made it... *about try number 100 ^^*

Object assistant helped :)