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 display another...
Power Pages
Unanswered

How to display another form when clicking the submit button

(0) ShareShare
ReportReport
Posted on by 265

hi,

I have created a form(form A) in a subpage. But When I submit the form by clicking submit button, I want Hide form A and need to show Form B in same page.

What are the ways to achieve it?

Thanks 

Categories:
I have the same question (0)
  • Verified answer
    Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hello @Erandi 

     

    You will have to go a code approach here.

    There are many ways to achieve this:

    Use Liquid to Render Both Forms: Ensure both Form A and Form B are on the same page. You can use Liquid templates to render these forms. Initially, set Form B to be hidden.
    2. Add JavaScript for Form Submission and Toggling: Implement JavaScript to handle the submission of Form A. Upon successful submission, you can use JavaScript to hide Form A and display Form B.
    3. JavaScript to Hide/Show Forms: You can use simple style manipulation in JavaScript. For example, you might set display: none on Form A and display: block (or flex, depending on your layout) on Form B when Form A is successfully submitted.

    Here’s a basic JavaScript snippet for the toggle effect:

    document.getElementById('formA-submit').addEventListener('click', function(e) {
    e.preventDefault();
    // Add your form submission logic here

    // After successful submission
    document.getElementById('formA').style.display = 'none';
    document.getElementById('formB').style.display = 'block';
    });

    Replace 'formA-submit', 'formA', and 'formB' with the appropriate IDs of your submit button and forms.

  • Erandi Profile Picture
    265 on at

    @Jcook Thank you very much for your support...

  • Verified answer
    fm_skeller Profile Picture
    277 Moderator on at

    For future reference, there is also the option of using Multistep Forms.

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
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard