hii!!
i am making a form in which the user fills in the fields and finally submits the form, which is then saved in the database

i use asp
and javascript for validations.

the user can see, all the enteries as a list in another page.
Now, i have to give the user a "save as draft" option.
in which he can enter some fields and save the form and complete it later...


maybe , i can have a "save as draft" button on the main form, on pressing which, the validations are not carried out, and the form is saved in some another table..

and the list on which the user see's the added forms can have a "view drafts" link which opens up a list of "drafts"

when the user clicks on it, the user can fill in the form , and click on submit it ( now the validations are carried on, and the form is saved in the original table )

and the "draft" is deleted from the list after its "saved"

that is the basic idea i have....

I need help on how to go about it ?

Recommended Answers

All 2 Replies

I did something similar recently. Basically a form which requires approval before being saved.

So, I created a copy of the table which normally holds the form data.
On save, the data is saved to the copied table. Once approved, the data gets copied to the original table and the record deleted from the temp table. If course, it usually just as easy to create an extra field on the table called Published or Draft and use it as a flag to determine whether or not the validations should be carried out.

In my case that would work as I was dealing with edits to live data and still needed another place to store the draft edits before being approved and made available to the public.

If your just starting you could probably save some work and just use a flag to determine between "draft" and "saved".

yups that's what i had done.................
added an extra field "draft" in the table....
works great for me..... :)

thanks for replying........... :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.