Copy link to clipboard
Copied
I have 5 text box form fields names Box1, Box2.... A number will be entered in Box1 if a number is entered in Box2 then I want the format for the number in Box1 to be Strikethrough. Same for Box3 if number entered then Box 2 number to be strikethroughed and then follow for the rest of the boxes. I know who to enable strikthrough for one standalone box but not based other entry of another box.
Here is an example how to achieve it using richValue, script would go to "Box1" as custom calculation script:
var spans = new Array();
spans[0] = new Object();
spans[0].text = event.value;
spans[0].strikethrough = this.getField("Box2").value == "" ? false : true;
event.richValue = spans;
Copy link to clipboard
Copied
Here is an example how to achieve it using richValue, script would go to "Box1" as custom calculation script:
var spans = new Array();
spans[0] = new Object();
spans[0].text = event.value;
spans[0].strikethrough = this.getField("Box2").value == "" ? false : true;
event.richValue = spans;
Copy link to clipboard
Copied
Thanks Nesa. This worked perfectly. I had a similar script that may or may not of worked, but made the mistake of putting it in under the format tab and not the calculate tab. I am learning a lot by reading your answers to all your posts.