【问题标题】:Livecycle hide/show sections based on user inputLivecycle 根据用户输入隐藏/显示部分
【发布时间】:2013-10-30 21:32:56
【问题描述】:

我正在尝试创建一个 livecycle 表单,您可以在其中根据用户输入隐藏/显示部分。

我正在使用单选按钮来指示应根据所选单选按钮显示哪个部分。整个表格会有很多,我要求表格流动并且没有空格。你能告诉我如何创造条件吗?

我有很多部分,并且我知道需要将部分的内容设置为流动,但我是在主窗体上还是在每个部分上都这样做?根据我选择使内容流动的子表单,它可以更改我不想要的部分对象的布局,因此我可能还需要有关如何更正此问题的建议。 除了创建简单的表单外,我对 Livecycle 没有任何经验。我试图在整个网络上寻求帮助,但没有什么能告诉我我需要什么。任何帮助将不胜感激。

我尝试在我的一个单选按钮上使用此代码。关于更改事件的内容如下:

if (this.rawValue == "1")
{    
    xfa.resolveNode("Section2.Section2.1").presence="visible";      
    xfa.resolveNode("Section3").presence= "hidden";    
    xfa.resolveNode("Section2.Section2.2").presence = "hidden"    
}
else (this.rawValue == "0")
{    
    xfa.resolveNode("Section2.Section2.1").presence = "hidden";    
    xfa.resolveNode("Section3").presence= "hidden";    
    xfa.resolveNode("Section2.Section2.2").presence = "hidden";

}

【问题讨论】:

  • 您是否正在尝试将 adobe livecycle 表单转换为 html 表单?

标签: javascript forms adobe livecycle-designer


【解决方案1】:

是的,您需要使根子表单(页面)布局可流动而不是定位。 这将根据显示/隐藏行为自动重新定位包含的子表单。

你的代码应该说:

if (this.rawValue == 1)
{    
    xfa.resolveNode("Section2.Section2.1").presence="visible";      
    xfa.resolveNode("Section3").presence= "hidden";    
    xfa.resolveNode("Section2.Section2.2").presence = "hidden"    

else if (this.rawValue == 2)
{    
    xfa.resolveNode("Section2.Section2.1").presence = "hidden";    
    xfa.resolveNode("Section3").presence= "hidden";    
    xfa.resolveNode("Section2.Section2.2").presence = "hidden";

}

我倾向于使用 click 事件而不是带有单选按钮的 change 事件。

干杯

【讨论】:

  • 感谢这个顺便说一句 - 我正在努力使用自己的版本,并意识到我有大写的 IF。
猜你喜欢
  • 2013-07-22
  • 2018-10-30
  • 1970-01-01
  • 2023-03-04
  • 1970-01-01
  • 2022-11-15
  • 2012-06-15
  • 2017-04-01
  • 1970-01-01
相关资源
最近更新 更多