web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Make a field hidden by default on portal entity form

(0) ShareShare
ReportReport
Posted on by 270

Hello,

How Can Make A field hidden by default on entity form, when load the page on Portal. I want this field to be visible after an event Occurs.

My field is hidden due to this javascript code:

    $document ).ready(function() {
            $("#field").closest("tr").hide();
    });
But, the field is displayed for a quick instant then hidden.
I want it to be hidden by default.
I have the same question (0)
  • Suggested answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at
    RE: Make a field hidden by default on portal entity form

    Hello Don,

    You can refer to this link for solution:  stackoverflow.com/.../how-do-i-hide-an-html-element-before-the-page-loads-using-jquery

  • Don foufione Profile Picture
    270 on at
    RE: Make a field hidden by default on portal entity form

    Hello,

    Yah, it's interesting but if only I got access to the entity Form HTML. they propose to add a class to the element. I don't think it is possible int the portal, isn't it?

    div.hidden

    {

      display: none

    }

    <div id="extraControls" class="hidden">

    </div>

    $(document).ready(function() {

       $("div#extraControls").removeClass("hidden");

    });

  • Suggested answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at
    RE: Make a field hidden by default on portal entity form

    Hello Don,

    No, You will not need access to the Entity form's HTML.

    Have you tried to achieve this using CSS only :

    #field tr:nth-child(rownumber) {display:none}

    Alternatively, you can achieve it by adding the class dynamically:

    1. Define a class in CSS

    .hideDiv

    {

     display: none

    }

    2. Now, add this class to your element dynamically:

      $( document ).ready(function() {

             $("#field").closest("tr").addClass("hideDiv")

       });

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 125

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 101 Super User 2025 Season 2

#3
Erin Lubben Profile Picture

Erin Lubben 57

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans