save as draft option

Reply

Join Date: Jun 2008
Posts: 185
Reputation: aashishn86 is an unknown quantity at this point 
Solved Threads: 9
aashishn86's Avatar
aashishn86 aashishn86 is offline Offline
Junior Poster

save as draft option

 
0
  #1
Apr 29th, 2009
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 ?
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 119
Reputation: agrothe is an unknown quantity at this point 
Solved Threads: 14
agrothe's Avatar
agrothe agrothe is offline Offline
Junior Poster

Re: save as draft option

 
0
  #2
Jun 4th, 2009
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".
------------------------------------------------------------
If you see no coffee in my immediate vicinity, speak slowly and use small words....
ConnectNL Directory | Blog
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 185
Reputation: aashishn86 is an unknown quantity at this point 
Solved Threads: 9
aashishn86's Avatar
aashishn86 aashishn86 is offline Offline
Junior Poster

Re: save as draft option

 
0
  #3
Jun 5th, 2009
yups that's what i had done.................
added an extra field "draft" in the table....
works great for me.....

thanks for replying...........
Last edited by aashishn86; Jun 5th, 2009 at 2:26 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC