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 / how to make fields in ...
Power Pages
Answered

how to make fields in form editable based on condition

(0) ShareShare
ReportReport
Posted on by 54

Hi All,

 

I have field

A (number)

B (text)

so let say if field A value is more than 1000 then field B is not editable. user cannot edit this field.

if field A is less than 1000 then field B can edit.

Do you have any reference on how to achieve this?

 

Categories:
I have the same question (0)
  • Verified answer
    domliu37 Profile Picture
    314 Super User 2024 Season 1 on at

    Hi @haryadihart ,

     

    There's no ootb way to achieve this so you'd have to use custom javascripts.

     

    lets say your first field is msft_a (number field) and second field is msft_b (text field)

    then you can try something like:

     

    var valueA = $("#msft_a").val();

     

    if (valueA  > 1000) {

        $("#msft_b ").attr('readonly', 'readonly');

    }

    else

    {

        $("#msft_b").removeAttr('readonly');

    }

     

    Cheers,

    Dom

     

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 41 Super User 2025 Season 2

#2
Suriyanarayanan V Profile Picture

Suriyanarayanan V 34

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 26 Most Valuable Professional

Last 30 days Overall leaderboard