473,395 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

'Saving as draft option'

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 ?
Apr 29 '09 #1
2 1838
GazMathias
228 Expert 128KB
This is essentially no different than the way e-commerce websites store basket information, namely, using cookies.

So, if the user has has ticked the save as draft box then you would write the form values to the cookie instead of the database.

If the user has not ticked the save as draft button then you would check for the cookie and delete it if found, then write the form data to the database (or vice versa).

Obviously when the form loads you would have the page check for the existence of the cookie to pre-fill the form (or display a button to fill it in using JavaScript, giving the user the choice).

The obvious benefit of this approach is that you don't have to store lots of temporary data in your database.

Downsides are that there is nothing to stop the user deleting cookies or disabling them altogether, and you also have to learn to deal with cookies through ASP, though the syntax of them is somewhat similar to other data structures in ASP as one one would expect. Try Googling ASP Cookies and you will no doubt come across a wealth of tutorials on the subject.

Gaz.
May 6 '09 #2
jhardman
3,406 Expert 2GB
you could also add a field to the db table, a boolean with a name like "isDraft". just a thought.

Jared
May 11 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

48
by: David J Patrick | last post by:
I'm trying to rewrite the CSS used in http://s92415866.onlinehome.us/files/ScreenplayCSSv2.html. using the w3.org paged media standards as described at http://www.w3.org/TR/REC-CSS2/page.html ...
1
by: Tom | last post by:
I have a large application; lots of forms, multiple dynamic DLLs, etc. I also have, in the appliation, a general 'Preferences' class object (which is in itself a separate DLL, and I just include a...
7
by: Brian | last post by:
I wrote this script here but I cannot get the script to save to the correct month.html. Can someone tell me what is wrong with this code? <html> <head> <title>Monthly Bills</title> </head>...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
0
by: Lyle Fairfield | last post by:
I was prompted to think about this by a couple of MLH's recent posts. Whether this is what he !!!!really!!!! wanted, I don't know. This code is supposed to open an e-mail in edit mode, although I...
2
by: John Murtari | last post by:
Folks, We are working on upgrading a web based application that allows the user to type quite a long essay and then submit it to the web site for processing. Occasionally, the user will lose...
2
by: jimdavidson | last post by:
I'm teaching myself PHP with limited success. I'm using PHP5 and dreamweaver. I have a basic drop down menu on a form. If the user forgets to enter some data I send him back to the form. What...
1
by: WebCM | last post by:
We can do it in different ways. Configuration data are sent by POST. Some of them should be parsed before saving to file. Perhaps, I will use var_export(). However, how to do it best? 1....
14
by: Stodge | last post by:
I'm trying to do the following. I have a Python application that is run: python app1.py --location=c:\test1 What I want to do is save the location parameter, so I can then do (in the same...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.