简体   繁体   English

如何将 HTML 表格保存为草稿,然后检索并填写 rest?

[英]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=ywww.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.

相关问题 有没有一种方法可以将HTML列表(UL,LI)保存到文件,然后检索并在以后显示? - Is there a way to save an HTML list (UL, LI) to a file, and then retrieve, and display it later? 如何保存HTML事件供以后使用? - How to save an HTML event for later use? 如何在客户端保存JSON文件并在以后检索? - How to save a JSON file on the client side and retrieve it later? 单击“另存为草稿”按钮时如何使用JavaScript保存表单内容? - How to save form contents using JavaScript when clicking the Save as Draft button? React.js-使用draft.js作为表单文本字段-如何初始化和检索内容 - Reactjs - using draft.js as a form text field - how to initialize and retrieve content 如何检索HTML表单值? - How to retrieve HTML form values? 如何获取表单以保存数据并稍后在页面上显示而不删除它 - How to get form to save data and show on page later without erasing it 如何保存此表单以备后用,将序列化数据存储在 JSON 中? - How to save this Form for later, storing serialized data in JSON? 如何在 javascript 中正确地将表单数据保存在本地存储中以供以后使用 - How to properly save form data in local storage for later usage in javascript 如何获取令牌并将其保存以供以后使用,因此无需每次都登录? - How to get token and save it for later so no need to login every time?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM