Jump to content

how to start a new page


Adam77

Recommended Posts

hey guys, i hope this is the right place to my question .

 

i have an html page wich contain a section with a form for the user to fill out. now, after the user fill the form he should move to the next form in the same section of the page . the question is, how do i earse the form that already been filled out  and replace it with the next form .

 

i hope it was clear enough .  

 

thanks 

Adam

Link to comment
https://forums.phpfreaks.com/topic/288411-how-to-start-a-new-page/
Share on other sites

Not really enough detail in the question to give a great answer but either submit the form and serve a new page which is easy but takes more computing resources or use Ajax (which is difficult but fast). Post what you have tried for a more specific answer.

if you don't want to go to a whole new page you could use JQuery to hide the previous form and then show the next one. Then just use Jquery to send all the vars of the forms filled out.

 

JQuery

$(document).ready(function(){
  $("#submit_button").on("click", function(){
      $("#form_2").show();
      $("#form_1").hide();
    });
});

HTML

<div id="form_1">
    <!-- Your Form 1 data here -->
    <div id="submit_button">Go to next form.</div>
</div>

<div id="form_2" style="display: none;">
    <!-- Your Form 2 data here -->
</div>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.