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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Custom JavaScript on t...
Power Pages
Unanswered

Custom JavaScript on the Web Form Step flicker to display form fields before hiding

(0) ShareShare
ReportReport
Posted on by 27

Hi, 

I'm using Custom JavaScript on the Web Form Step to hide the fields based on the value user select in one of the top field in the form but it flicker to display all fields for 500ms every time I start the form or even in each step I navigate to.

How to avoid that? 

 

Thanks,

-RI

Categories:
I have the same question (0)
  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @RILocal , 

     can you test this in Incognito window without any extensions on your browser ?  Also I am assuming you are using chrome. Can you also check in other browsers as well in Incognito mode without any extensions and let us know. 

     

    Hope it helps. 

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • RILocal Profile Picture
    27 on at

    Hi, I tried in the incognito in Chrome and Edge and found the same issue, the fields display, flick and then hide based on the logic I have in the custom js on web form step.

    I’m using fetchxml template to get the values from one table and setting values in the dropdown field on my form, then I’m using web form step that have that dropdown and some other fields.

    The custom js goes like this

     

    //Get values from fetchxml template 

    $.getJSON("/fetchxmltemplate?id=" + primaryValue, function(data) {

     

    //Check values in dropdown

    if (dropdownvalue != "") {

    $("#" + DropdownName).val(dropdownvalue);

     

    //Calling function to hide

    ToggleContent();

     

    //Hiding field

    function ToggleContent() {

    $("#cr501_InputField").closest("td").hide();

    }

     

     

    Thanks,

    -RI

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Hi @RILocal ,

    Unfortunately, this is a common problem. You cannot hide fields by default (as they will not render at all if you will hide them on the form) and using custom classes will not work either (because of how MS renders controls it will hide only input but not the corresponding label). You can, of course, build your own form with liquid but it is an overkill, to be honest. We have the same issue and unfortunately for now just leaving it as is.

  • Verified answer
    RILocal Profile Picture
    27 on at

    Hi, I set the form fields hidden using css in the web template and then changing them to display on the form steps. It kind of solved my problem for now.

     

    Thanks,

    RI

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard