Search code examples
htmlxcodeipadformsdata-storage

Ipad - storing data from a webform


I have a simple form on a web page. I've got an ipad that is going to be used in a room with no 3g or internet connection.

How can I store the results of all the data that is submitted through the form, so that later, i can just download that data or export it somewhere?

What's the quickest way?

without having to recreate the entire form in xcode?

Jason


Solution

  • With such little data to store, NSUserDefaults is probably the way to go.

    Save a string:

    [[NSUserDefaults standardUserDefaults] setObject:@"TextToSave" forKey:@"keyToLookupString"]];
    

    Retrieve a string:

    NSString *myString = [[NSUserDefaults standardUserDefaults] stringForKey:@"keyToLookupString"];