What is the best way to hide a field on a form when multiEditable: false.

What is the best way to hide a field on a form when multiEditable: false.

Turlock Irrigation DistrictTurlock Irrigation District Posts: 4Questions: 3Answers: 0

What is the best way to hide a field on a form when multiEditable is set to false for the specific field? The field should not display at all if it is not editable.

Answers

  • Turlock Irrigation DistrictTurlock Irrigation District Posts: 4Questions: 3Answers: 0

    The following worked for me.

    editor
    .on('open', function (e, type) {
    debugger;
    var shortName = this.field('ShortName');
    var description = this.field('Description');

                if (shortName.isMultiValue()) {
                    shortName.hide();
                }
                else {
                    shortName.show();
                }
    
    
    
                if (description.isMultiValue()) {
                    description.hide();
                }
                else {
                    description.show();
                }
            })
    
This discussion has been closed.