The actions that need to be followed are as follows in order to hide or show fields in the power apps portals.

The first step is to launch the power apps and choose the one that will execute out the necessary action.

Now access the power apps and Portal management and configure the selected app.

The page for managing the portal is displayed below.

steps for making hidden and visible fields in portals.

Step 1: Create a Web Template

Open the web template, complete all the necessary fields, and leave the Source blank for the time being.

Step 2: Create a Page Template

As shown below, complete the required fields on the page template.

We must develop a basic form after creating the web template and page template.

Step 3: Create a Basic Form

A new form can be created by opening the basic form and filling out all the necessary fields.

Open the web template now, and add some liquid code to the basic form so that it will appear on the website.

Liquid Code:

{% block main %}
{% include ‘Page Copy’ %}
{% entityform name : ‘Hide Basic Form’ %}
{% endblock %}

Step 4: Create a Web Page

To see the entity form on the web page, we must first create a web page.

In this webpage, we must enter the javascript code in the Advanced tab and, after saving the page, enter the same code in the content page.

JavaScript Code:

$(document).ready(function()
{
$(‘#crmonce_city’).change(function()
{
var Test1 = $(‘#crmonce_city’).val();
if(Test1 == “Chennai” || Test1 == “chennai”|| Test1 == “Hyderabad” || Test1 == “hyd”)
{
$(‘#crmonce_state’).parent().parent().hide();
}
else
{
$(‘#crmonce_state’).parent().parent().show();
}
});
});

Step 5: Create Table Permissions

Without table permissions, the basic form won’t open, thus we need to create them.

visit the website while configuration is being synced.

Create a record with “hyd” as the “city” and pay attention to the State field, and the website will display as in the above figure.

When I enter “hyd” in the city form on this page, the state field will hide as seen in the figure below.

once more, Nellore is entered as the city name. Besides “Chennai,” “Chennai,” “Hyderabad,” and “hyd.” State field will be discernible.

The fields can also be hidden or shown depending on our needs.

For any Help or Queries Contact us on info@crmonce.com or +918096556344.