Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Dynamic spacing between two fields on runtime

Avatar

Level 2

Hi all,

I want to provide space between two fields on runtime.

The current output looks like:

spacing between two fields dynamically adobe form.JPG

In the above output, there is a manual space put up in the layout of design view, but in actual i want to join both fields together without space and it should

display with spaces on runtime.

I have tried changing both fields layout to expand to fit along X and also tried it in flowed subform with western text, but nothing is working.

Please post your advice and inputs as soon as possible.

Thanks,

Saurabh.

1 Reply

Avatar

Level 7

Definitely too late for this i would think, but here is a nice solution.

I have a textfield with the default value "Amount: "

I also have a second textfield for the amount value. I used a textfield because a value of 1.00 in a numericfield will become just '1' in a text field when you move the raw value.

On the textField2 exit event i have this:

form1.#subform[0].TextField2::exit - (JavaScript, client)

TextField1.rawValue = TextField1.rawValue + TextField2.rawValue + " INR";
TextField2.presence = "hidden";

What will happen is that when TextField2 is exited, the textfield rawValue changes to itself, the TextField2 rawValue and the text "INR". TextField2 then disappears so all you are left with is one field with all the text as you want.

Two fields

1512716_pastedImage_4.png

TextField2 contains the Amount value you specify

1512714_pastedImage_2.png

When exiting TextField2, the text is all concatenated together.

1512715_pastedImage_3.png