[英]javascript - Make all fields on a form required
I want to be able to loop through all the fields on a form and make them required in a bit of javascript. 我希望能够遍历表单上的所有字段,并在一些JavaScript中使它们成为必需。 I have been able to do a similar thing to make them disabled and have retrieved them all with
var controls = Xrm.Page.ui.controls.get();
我已经能够做类似的事情来禁用它们,并使用
var controls = Xrm.Page.ui.controls.get();
检索了它们var controls = Xrm.Page.ui.controls.get();
, but I know to set requirement level I need to get the attribute rather than the UI control, how can get get all attributes at once so I can loop through them? ,但是我知道要设置需求级别,我需要获取属性而不是UI控件,如何一次获取所有属性,以便可以遍历它们?
Thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.