I now want to implement a form submission function similar to the software installation process, that is, fill in the first form, then fill in the second form in the next step, and finally submit it together. You must fill out the first form before you can fill in the second form. form, and finally fill in the values of the two forms into the database together, but I can't always get the value of the first form in the second form. I want to ask how I can implement this function. I think there are many method.
,
var tag=document.getElementById("id");
tag.value
When the first form is submitted to the second form, you can use hidden input to record the previous form
As mentioned above, put the two forms into one form, use js controls the hiding and display of elements. First, the elements in the first step are displayed, and the elements in the second step are hidden using css. Then when the first step is completed and the next step is clicked, js is used to hide the first step and the elements in the second step are displayed. The function of the original poster can be realized. This is the simplest way.
These two forms are on two different pages. I also use the hidden method. The action of my first form (nav1.html) is the action of the second form (nav2.html) and then in Setting a hidden field in nav2.html attempts to pass the value to nav1.html, but I have never gotten this value (I wrote a get.php method, which is the value of the action in nav2.html), but I don't Get the value in the nav1.html form
Thank you everyone above. Please give me more details if you know it.
Already solved. Used smarty to get the value and then display the h page you want to go to, still use the hidden field. This is my first time posting on csdn. I am very grateful to the three people above for their help and support. . .