panel(name:"Reference Name") {
label("Select XML field for reference name:", constraints:gbc(gridx:0,gridy:0, anchor:WEST))
comboBox(id:"refNameSelectBox",items:displayNameOptions, constraints:gbc(gridx:0,gridy:1,ipadx:20, anchor:WEST))
label("Before:", constraints:gbc(gridx:0, gridy:2, anchor:WEST))
textField(id:"refBeforeText", text:"taco", constraints:gbc(gridx:1,gridy:2,ipadx:30, gridwidth:REMAINDER, anchor:WEST))
label("After:", constraints:gbc(gridx:0, gridy:3, anchor:WEST))
textField(id:"refAfterText", text:bind(source:dispBeforeText, sourceProperty:'text'), constraints:gbc(gridx:1,gridy:3,ipadx:30,gridwidth:REMAINDER,anchor:WEST))
checkBox(id:"refSpaceUnder",text:"Replace spaces with _", constraints:gbc(gridx:0,gridy:1,gridwidth:REMAINDER,anchor:WEST))
checkBox(id:"refNoSpecials",text:"Remove Special Characters", constraints:gbc(gridx:0,gridy:2,gridwidth:REMAINDER,anchor:WEST))
}
I'm trying to give the user a preview of some text manipulation. Right now, I have refAfterText bound to refBeforeText which just copies the text. I want to use those last two checkboxes to alter the text. Checking both boxes would change refBeforeText from "I have a Taco!" to "I_have_a_Taco" in refAfterText.