Changing Text Field size with Javascript based on Conditions
Hi everyone,
I have a text field "exteriorElectricalDeficiency1" that causes a second text field "exteriorElectricalPrice1" to become hidden one the word "NOTE" or "note" is written in it.
I'm trying increase the current width of the deficiency text box of '6.5748 in' to '7.2112 in' as long as the price field is hidden and back to its original size when it isn't hidden.

This is my current code attempting to accomplish this:
//This hides the price field if the deficiency contains a note
if(event.value.indexOf("note") > -1 || event.value.indexOf("NOTE") > -1) {
defNumber = event.target.name.substring(event.target.name.length - 1);
this.getField("exteriorElectricalPrice" + defNumber).hidden = true;
if (this.getField("exteriorElectricalPrice" + defNumber).hidden == true) {
event.target.w = "7.2112in";
//I've also tried event.target.x = "..."
}
} else {
this.getField("exteriorElectricalPrice" + defNumber).hidden = false;
event.target.w = "6.5748in";
//I've also tried event.target.x = "..."
}
This code is in the validation script of the deficiency box.
I'm not sure if the '.x' or the '.w' should be used and I also don't know if the 'event.target' should be used.
Any input you guys can give would be amazing!
