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
BedrockMission!

Learn more

View all

Sign in to view all badges

Field caption based on variable from drop-down list

LucreciousDFF
Level 3
Level 3

Hello,

I am attempting to code a concatenation string with the rawValue result from a drop-down field and insert the string into the caption of another field. Is there a way to have the caption of a signature field populate dynamically based on the value from a drop-down list along with static text, so, a concatenated string which has static text, a dynamic piece pulled from a drop-down list, and, additional static text? Can a field have a dynamic caption?

1 Reply
radzmar
Level 10
Level 10

Hi,

this is not that complicated. Just add a script in the exit event of the dropdown to update the fields caption:

var oField = xfa.resolveNode("form1.#subform.SignatureField1"), // reference the signature field

    cValue = this.rawValue; // the current selection of the drop down

oField.caption.value.oneOfChild.value = "You've selected " + cValue; // modify the signatue fields caption