XForms:xxforms:变量破坏了 xforms-alert 功能
我的表单中有以下标记来捕获查询字符串参数。
<xxforms:variable name="param1" select="xxforms:get-request-parameter('param1')"/>
我在此表单上有许多表单字段,其中一些是显示红色警报图标的必填字段。当用户填写这些字段时,红色警报图标将变为绿色复选标记。这在没有上述变量声明的表单上工作得很好。
添加上面的变量声明行可以防止填充表单字段时红色警报图标变为绿色复选标记。需要帮助来解决这个问题。
I have the following tag in my form to capture a query string parameter.
<xxforms:variable name="param1" select="xxforms:get-request-parameter('param1')"/>
I have many form fields on this form and some of them are required fields displaying the red alert icon. As user fills these fields, the red alert icon changes to green check mark. This works fine on the form without the above variable declaration.
Adding the above line of variable declaration prevents the red alert icons from changing to green check marks when form fields are filled. Need help to fix this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最有可能的是,这是因为您只能在加载页面时使用
xxforms:get-request-parameter()
,即在xforms-model-construct-done
或xforms 就绪
。因此,如果稍后需要请求参数的值,则需要将其存储在 xforms-model-construct-done 上的实例的节点中,然后更改变量以指向该节点(或者使用变量更改代码以直接指向节点)。Most likely, this is because you can only use
xxforms:get-request-parameter()
when the page is being loaded, i.e. onxforms-model-construct-done
orxforms-ready
. So if you need the value of a request parameter later on, you need to store it in a node of an instance onxforms-model-construct-done
, and then change your variable to point to that node (or change the code using the variable to point to the node directly).