M
Mohammed Siraj
Guest
Meryem, direct DOM manipulation may not suffice as for some of the field controls we need to set the options before the kendo widget is initialized & the actual steps may also vary from one field type to another. Understand your requirement of dynamically marking some fields as 'required'. Request you to file an enhancement for the same in IDEAS section. Will provide an client-side API method going forward that will correctly mark the field as required & also integrate the same with kendo validator. For now, to mark the Date field as REQUIRED: var fieldContext = rbf_getFieldContext(fieldName); if(fieldContext){ var fieldEl = fieldContext.getNode(); fieldEl.prop('required',true); fieldEl.attr('data-required-msg','Date field value must be specified'); } These steps should suffice for most of the field types, as it follows HTML5 spec for validity constraints, which we are enforcing using KendoValidator. Note: To create/access a jquery object for a field, use rbf_getFieldContext(fieldName).getNode(). This way you will not have to run a jquery selector which will have performance overhead but instead, existing jquery object from PageContext state will be returned.
Continue reading...
Continue reading...