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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / OnChange event handler...
Power Pages
Unanswered

OnChange event handler in Dataverse entity form

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Guys,

have you used event handlers in entity form? 

My requirement is to on text changed of field on entity form I wanted to disable few fields on the same form. To test with I have added simple javascript code to print "hello world" on change of a field.

but , Javascript function doesn't trigger , so it doesn't happen anything.

 

can you able to share some of your suggestions.

Categories:
  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at
  • OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Hi @Anonymous,

    Event handlers in the form itself will not work on the Portal, they work only inside model-driven apps. You would need to add on change triggers in the Custom Javascript section of the form. Your code would look something like this:

    $(document).ready(function () {
     // id of the field is its logical name
     $("#title").change(onTitleChange);
    });
    
    function onTitleChange() {
     console.log("My title changed");
    }

    You can find more about working with Javascript for portal in this official doc. In general, I would advise you to google example on using code specifically on entity forms as code design to work inside dataverse won't work on the portal.

  • Fubar Profile Picture
    17 Super User 2026 Season 1 on at

    Its done often - as per the previous posts. 

    Not, sure if it is still the case but we came across an issue for an Entity Form popup (actually inline) rather than on a Web Page, where we had to change the (document).ready to another keyword than 'ready'.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 35

#2
M Bilal Khan Profile Picture

M Bilal Khan 33

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard