function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mariappan PerumalMariappan Perumal 

Showing Empty spaces in vf page

Hi all,

 

I have written a vf page in which i am comparing 2 fieldset and have one more condition 

 

I tried to rendered the inputfield based on condition , Its working fine but the problem is it simply hide the field.

and showing me blank row for the condition which didn't met the condition.

 

I have pasted the code below.

 

apex:repeat value="{!PersonalinfoFields}" var="f">
<apex:repeat value="{!Fieldsconfig}" var="conf">
<tr><td> <p><apex:outputlabel value="{!f.label}" rendered="{!AND(a[conf.fieldPath]==true,f.label==conf.label)}" /></p></td><td><div style="margin-left:85px;"> <apex:inputField value="{!app[f.fieldPath]}" rendered="{!AND(a[conf.fieldPath]==true,f.label==conf.label)}" style="width: 250px; height: 20px; border:inset 2px;" id="fname"
/></div></td></tr>
</apex:repeat>
</apex:repeat>

 

Can anyone help me out of this.

 

Thanks in advance.

 

 

hitesh90hitesh90

Hi,

 

You have to add <table> tag above <tr> to remove the blank row. here is the example

 

<apex:repeat value="{!lstAcc}" var="f">
    <apex:repeat value="{!f.contacts}" var="conf">
        <table>
        <tr>
            <td>
                <p>
                    ppp
                    <apex:outputlabel value="{!f.Name}"  />
                </p>
            </td>
            <td>
                <div style="margin-left:85px;">
                    ppp
                    <apex:inputField value="{!f.Name}"/>
                </div>
            </td>
        </tr>
        </table>
    </apex:repeat>

 

 

Important :

Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

 

Thanks,

Hitesh Patel