I have another form in LiveCycle Designer ES where 2 text fields that are exactly the same at different parts of my form. It's a common question perhaps, but I need the 2nd instance to automatically populate AS SOON AS the first one is filled in.
Basically I created a checkbox where customer ticks if "shipping same as billing address". What I want is this: As soon as that box is checked, I want those duplicate fields to fill in automatically with the already-filled in shipping info.
Thank you.
Hi,
If you want both the fields to have same value just after entering value to one field without clicking the checkbox then you can do the following.
- Set the fields to the same name. If it's TextField1 and you have another TextField2 rename the latter field toTextField1. Automatically it will make the first field as TextField1[0] and the second field as TextField1[1]. Then you can set the binding of the 2nd field as global, so that it will automatically display the same value after you exit from the first field by entering some value.
If you want to click the checkbox first, so that it will display the same value in the latter text field, then you can put the following script in the click/change event of the checkbox.
if (shipping same as billing address.rawValue == 1)
{
billingAddress.rawValue = shippingAddress.rawValue;
}
Thanks,
Bibhu.
Bibhu,
Thanks so much for your reply.
1. OK, for the duplicating fields part, thanks, that worked. But as I look at it now, it gave us a chance to see it "from the customer's point of view" which you know is always best. So, it was cool 'n all, but I think, from the customer's point of view, maybe we should have them use the checkbox AS WELL. Allow me to explain:Views
Replies
Total Likes
Hi,
First of all I want to clarify click/change event. What I meant here is either change event or click event. I should have explained it in detail .
My suggestion :
We can write somescripts in the exit event of ShippingAddress so that it will show the same value in the Billing Address, The by default value of the check box would be checked.
Now if the user wants to change the Billing address then he can change that and by doing so it will uncheck the checkbox. We do not need global binding here.
Is it ok to do ?
Thanks,
Bibhu.
Bibhu, Genuine apologies. I posted my reply about a week ago, something like "absolutely! thanks" but logging in, but my response didn't make it thru and I checked and mail was returned. YES, I'd really appreciate your help. I have 2 forms:
1. the one we were about to work on form for the billing/shipping address with checkbox you'll help with some scripting so that as soon as they UNcheck the "same as shipping box" (which will be on by default with a mouseover that says "UNcheck to revise the billing address). Thanks 10x.
2. This form (and another) have an even more basic problem: they won't even distribute. Seem my earlier post (i think was within about 5 posts of this one originally). I still can't find the error.
Thanks in advance.
Please let me know how I can get the form (1. above) to you. Thanks Bibhu.
Views
Replies
Total Likes
Hi,
See my reply below.
In the exit event of the Shipping addres :
if (Billing_Address.rawValue != null)
{
Billing_Address.rawValue = this.rawVale; // Shows the same values of Shipping Address in the field of Billing Address.
CheckBox.rawValue = 1; // Makes the check box "Checked".
}
In the mouseEnter event of the checkBox.
if (this.rawValue == 1)
{
app.alert("UNcheck to revise the billing address.");
}
in the change event of the checkbox .
if (this.rawValue == 0)
{
Billing_Address.rawValue = null; // Makes the previously filled value of Shipping address as null.
}
Hope this helps.
Thanks,
Bibhu.
Thanks. The problem is that when the checkbox is unchecked, and you try to then edit the lower (Billing) field, it changes the original upper (Shipping) field. Please note: my correct/new form has Shipping first then Billing second. I reposted this for greater clarity and appreciate your continued help.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies