Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Field caption based on variable from drop-down list

Avatar

Level 4

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

Avatar

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