【问题标题】:Adobe LiveCycle Designer Numeric Field set valueAdobe LiveCycle Designer 数字字段设置值
【发布时间】:2025-12-12 14:40:01
【问题描述】:

它可能关注的对象:

在 Adob​​e 表单中有一个汇率字段,rawValue 基于数字字段,必须由用户填写。

以下代码是在 (formCalc, Client) 下执行此操作的代码:

if     (Paid2.selectedIndex == "Cash")then
       Exch2.rawValue = AdvCash.rawValue
elseif (Exch2.selectedIndex == "Card") then
       Exch2.rawValue = ""
endif

上述代码的问题是,一旦用户在其中输入自己的 Card Exchange rate Exch2.rawValue 值并出错并重新选择“Cash”,它就不会运行 If 语句的第一行。

问题的最后一部分是如何在上面的if then语句中添加以下代码

Exch2.rawValue.ui.oneOfChild.border.fill.color.value = " *, *, * "

if     (Paid2.selectedIndex == "Cash")then
       Exch2.rawValue = AdvCash.rawValue
       Exch2.rawValue.ui.oneOfChild.border.fill.color.value = "229, 229, 229"
elseif (Exch2.selectedIndex == "Card") then
       Exch2.rawValue = ""
       Exch2.rawValue.ui.oneOfChild.border.fill.color.value = "255, 255, 153"
endif  

上述 fill.color 没有提供所需的结果。

希望任何人都可以在这方面提供帮助

【问题讨论】:

  • 试试Exch2.ui.oneOfChild.border.fill.color.value = "229, 229, 229"

标签: adobe designer livecycle


【解决方案1】:
  • 至您的第一个问题: 您可能在“错误”(更改?)事件中运行脚本。尝试在下拉列表的退出事件上运行。

  • 到您的第二个问题: 去掉 Exch2.rawValue.ui.oneOfChild.border.fill.color.value = "255, 255, 153" 中的 rawValue 应该就可以了。

【讨论】: