facebook

Form for local storage and usage?

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #341852 Reply

    SKnoxmn
    Member

    Fill out a form and store data locally. Something like a contact list. But think along the lines of cars. Such as Make Model Year Color…

    Just looking for an example, I’ll poke around on the “Net” when I get home and see what I can come up with. But in the meanwhile…

    SKnox

    #341865 Reply

    Proffie
    Member

    Hi SKnoxmn,
    I have such an App, but are you looking for free text input, or pre-defined input fields? (Combobox, dropdown lists) Like they have on car sale web sites?
    This would need dynamically changing comboboxes. (the model would depend on the brand, the engine depending on model, and so on…)
    basically, the cordova/ apache documentation on storage is excellent and has a copy and paste example available for the local storage part.

    #341877 Reply

    SKnoxmn
    Member

    Thanks for the direction on this one, appreciated.

    I’m going to be trying to set up a form for users to fill in the fields and give that data set, or profile, a name.
    I would think that once they “Save” the record, I would use the Profile name to extract the additional, related field data.

    Problem is that I’ve read on this very site that there are issues with the amount of data, or records, or something that the forms will store. or perhaps the format in which they are stored.

    Ultimately Id like the users to enter the data, then have a comboBox populated with the “Profile Names”.

    SKnox

    #341885 Reply

    Hi SKnoxmn,

    >Just looking for an example, I’ll poke around on the “Net” when I get home and see what I can come up with. But in the meanwhile…
    Local Storage Demo on Examples, HOW TOs forum should be helpful for getting started.

    #341886 Reply

    SKnoxmn
    Member

    There were things out there on LocalStorage. Seems that one “Simple” method is with a key/value. But thats about all the window.localstorage seems to be capable of handling.

    I did poke around and found some sites saying you can use a SQL lite DB for local storage and those would allow for more data fields based on a PK.

    So far, I’m finding the highly recommended FireFox plug-in for SQLite Database Manager to work really well. Easy to use and a pretty nice UI. Can see a nice tutorial on it here https://github.com/tthibo/SQL-Tutorial/blob/master/tutorial_files/part1.textile

    I have created a main db and added a couple tables, manually populated one of those tables, and did an Import from CSV for the second table. So far so good. SQL Queries are coming back with good data results.

    I’ll be looking over the rest of the forums as to how to incorporate said db into my little app.

    SKnox

    p.s. Hopfully, soon, I’ll be able to contribute some assistance to the other newbies like me.

    #341921 Reply

    Proffie
    Member

    Just to point you in the right direction. the localstorage IS using SQL. you can pretty much use most SQL statements to manipulate your DB. The size restriction is depending on the size you give your database at creation. I will post a .mobi example here for your trials, which has the javascript attached to a button. the better style is, to put your javascript into your XXX_custom.js file and only call the function from the button, but that would not show the code in the .mobi file for you

    Attachments:
    You must be logged in to view attached files.
    #341932 Reply

    SKnoxmn
    Member

    Thank you Prof.

    I’ll be checking this out later this week. The plan is to have users “Set up” a profile by entering the fields with data and saving that.

    I should probably be looking into how to get that sqldb into my project directory. I’m pretty sure Dr. Oct(avio) has a “how to” out there already, so I’ll go that route first.

    Next will be to allow them to “Pull up” a presaved “Profile” and either change that data (edit / save) or confirm and move on to the next screen.

    So I know that I’m coming up getting a wheel to populate its options based on a “Profile name” from the sql db. But I’ll burn that bridge when I cross it.

    Meanwhile, I’m still stuck on getting some current device orientation information without a continuous update.

    I appreciate the direction on this very much,
    SKnox

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Form for local storage and usage?

You must be logged in to post in the forum log in