I'm new working with Lifecycle and I'm trying to create a form where the client select a color from a drop down menu and a text on a filed will change.
This is a example of what I'm trying to do.
My script is working fine to change the first field but the problem comes when the client add a second or more fields, the dropdaown menu is not changing the text on the new fields.
This is the code that I'm using.
var oldText = form.testPage.beltsOrder.regBelts.styleInfo.beltInfo.rawValue;
var newText = oldText.replace("[belt color]", this.rawValue);
form.testPage.beltsOrder.regBelts.styleInfo.beltInfo.rawValue = newText;
I tried many differen ways without any luck, please I'll appreciate any help.