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 / Need Cancel button on ...
Power Pages
Answered

Need Cancel button on Entity Form in power apps portal

(0) ShareShare
ReportReport
Posted on by 121

Hello,

 

I have a Create Entity Form for one of the entity, On that form, I can see the Submit button to insert the records into the entity, Along the line I also need the Cancel button to cancel the form, However, I have a * sign on the top right section of the form to cancel the form.

 

Please suggest any solution to this.

 

Regards,

 

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

    hi

     

    can you add a snapshot with the issue and what you need?

    is your entity form showing as a pop-up within an entity list?


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

    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.

  • praneshJ Profile Picture
    121 on at

    Hi @OliverRodrigues ,

    Let's say I have a web page in the power apps portal, and I have one form component on that web page, as shown in the screenshot below,
    Besides the Submit button in the form component, I need the 'Cancel' button to reload the same page.

     

    praneshJ_1-1600330289416.png

     

    Please add comments on this.

     

  • Verified answer
    oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    You can achieve that via JS/jQuery

     

    You can add the below code into the Custom JavaScript section on your Entity Form

    $(document).ready(function(){
     AddCloseButton();
    });
    
    function AddCloseButton(){
     var button ="<input type='button' class='btn btn-warning' value='Close' onclick='parent.$(\".form-close\").eq(0).click();'/>"
     $("#EntityFormControl_EntityFormView").next().append(button);
    };


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

    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.

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    @praneshJ did that solution work ? if yes can you mark as answer so people can refer to it in the future?

    thanks

  • praneshJ Profile Picture
    121 on at

    Hi @OliverRodrigues ,

     

    The button is getting displayed on the popup as expected, but on click of that button popup window is not getting closed using the given code in above solution.

    praneshJ_0-1600936627647.png

     

    Any alternatives to close the popup on click of this close button, would be really helpful.

     

    Regards,

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    In my code I am finding the main close button "x" via class: form-close

    inspect your element and see if you have the same class there, if it is a different one you can replace in the code

  • praneshJ Profile Picture
    121 on at

    Hi @OliverRodrigues ,

    In my code I am finding the main close button "x" via class: close,

    and i have replaced it with the close in my code now, please check the below screen shot.code.PNG

    but it still not getting closed.

     

    when I checked replacing close with form-close that in the browser, its working fine then.

     

    Please suggest any alternatives or let me know how can I replace the class for that "x"  button ?

     

    I am really thankful for your quick replies.

     

    Regards,

     

     

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    is it working for you with the .close class? 

    whatever class works for you is fine, there is no need to change the x button

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
M Bilal Khan Profile Picture

M Bilal Khan 139

#2
Mohsin Ali Profile Picture

Mohsin Ali 41

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard