Combining formatting scripts in Javascript for Adobe PDF forms
Hello,
I am relatively new to Javascript in general and I am having trouble finding a solution to my current issue. I have two pieces of code which I have found on this forum previously that I need to be set to the formatting script of a field that is created in my code. these are as follows:
Code 1:
f.setAction("Format", "event.value = util.printf(\"£%,0.2f\",event.value);");
Code 2:
event.richText = true;
var spans = new Array();
spans[0] = new Object();
spans[0].text = event.value;
spans[0].strikethrough = true;
event.richValue = spans;
I need to find a way to combine them together so that they both function. The idea is that I can assign a value to a field that is 500 for example, and it will display as £500.00 with a strikethrough.
Any help is very appreciated.
