根据Adobe窗体中的多个复选框选择在字段中显示文本

时间:2015-11-02 04:30:55

标签: javascript adobe

我的PDF表单上有很多问题,其中一些是多选的。

我有以下脚本:

event.value =(this.getField(“Question2b”)。isBoxChecked(0)== true&& this.getField(“Question2c”)。isBoxChecked(0)== true&& this。 getField(“Question2e”)。isBoxChecked(0)== true&& this.getField(“Question2f”)。isBoxChecked(0)== true&& this.getField(“Question2a”)。isBoxChecked(0 )== false&& this.getField(“Question2d”)。isBoxChecked(0)== false)? “正确”:“不正确”

但我无法让它发挥作用。

如果他们选择了正确的(问题2b,2c,2e和2f),脚本应该显示“正确”的输出,如果他们选择其他任何东西,它应该显示不正确。我已经研究了如何为单选按钮分组执行此操作,但无法找出复选框。

1 个答案:

答案 0 :(得分:0)

不确定这是否回答了您的问题,但我遇到了isBoxChecked(0)的问题并处理了事件,所以我只检查了值。它不是最干净但却有效。

this.getField("Question2c").value!='Off' &&

而不是

this.getField("Question2c").isBoxChecked(0)==true &&