[英]How to save an HTML form as draft and then retrieve and fill the rest on later time?
I have an html form that takes and stores information in MySql database using php.我有一个 html 表单,它使用 php 在 MySql 数据库中获取和存储信息。 Lets call this form's file name as "form.php".让我们将此表单的文件名称为“form.php”。
This form is called whenever we want to enter information of an object.每当我们要输入 object 的信息时,都会调用此表单。 Let's call one of the object's name as 'x'.In order to fill information for it, the url goes like www.domain.com/form.php?object=x and we fill details for x.让我们将其中一个对象的名称称为“x”。为了为其填写信息,url 类似于www.domain.com/form.php?object=x并填写 x 的详细信息。
Similar goes for another objects like 'y' and 'z' viz.类似的其他对象,如“y”和“z”即。 www.domain.com/form.php?object=y and www.domain.com/form.php?object=z . www.domain.com/form.php?object=y和www.domain.com/form.php?object=z 。
Now my question is how can I partially fill forms for these objects and then complete and submit them at later stage of time.现在我的问题是如何为这些对象部分填充 forms,然后在稍后阶段完成并提交它们。 Many solutions target form just for one url, I have same form with multiple url variables.许多解决方案仅针对一个 url 的形式,我有多个 url 变量的相同形式。
The way to do this is to allow the user to submit the form in parts, ie page 1 (submit) page 2 (submit) page 3 (submit) page 4: "Review" - and this is the final submit and this is when the form gets processed.这样做的方法是允许用户分部分提交表单,即第 1 页(提交)第 2 页(提交)第 3 页(提交)第 4 页:“审查”——这是最终提交,这是当表格得到处理。
And using JavaScript ajax, you can do the same sort of thing with just one long page by sending the partial form answers to the backend and then showing them if/when the form is reloaded并且使用 JavaScript ajax,您可以通过将部分表单答案发送到后端,然后在重新加载表单时显示它们,只用一个长页面来做同样的事情
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.