In one tab, I've two sections, each section have five rows of fields. I am hiding fields on the base of empty values. In one section that is Parties, fields are being set to hidden with no empty space while in other section that is Addresses, fields are being set to hidden but they left empty space for each field.
Following is the code snippet that I am using to hide in both sections:
for(i = 0; i < 5; i++){ attrValue = Xrm.Page.getAttribute(<fieldName>+ String(i+1)).getValue(); if(attrValue == null || attrValue == 'undefined' || attrValue == ""){ Xrm.Page.getControl(<fieldName>+ String(i+1)).setVisible(false); Xrm.Page.getControl(<fieldName>+ String(i+1)).setVisible(false); temp++; } }
And here is who sections looked when fields are set to hidden. Any Idea how to avoid white space in Addresses?