0

我正在 Adob​​e Livecycle 中构建一个表单,并希望所有负数都显示为红色。我可以通过将此代码附加到退出事件来在单个元素上完成此操作:

form1.#subform[0].Table3[0].HeaderRow.concessions1::exit - (FormCalc, client)    
if ($.rawValue <0) then
        $.font.fill.color.value = "255,0,0"
        else
        $.font.fill.color.value = "0,0,0"
    endif

目前我必须将此代码添加到每个字段中,有没有办法让这个脚本在多个字段上运行而无需为每个字段重新输入?

谢谢

4

1 回答 1

0

your options are:

  1. Externalize the code in a script object and call the method on the exit event. You can pass the field as an input parameter so that your code is generic.

  2. If you want to do this before a form is submitted, you can create a method that loops through your form fields and reference this code to highlight the negative values.

I hope this helps. Let me know if you have any more questions.

Thanks, Armaghan.

于 2013-12-15T02:43:36.443 回答