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 / OnChange event handler...
Power Pages
Unanswered

OnChange event handler in Dataverse entity form

(0) ShareShare
ReportReport
Posted on by

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:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at
  • OOlashyn Profile Picture
    3,496 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
    8,352 Super User 2025 Season 2 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

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
Fubar Profile Picture

Fubar 74 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard