Discussion Forums  >  WebViews and HTML for Mobile

Replies: 17    Views: 208

sudheer k
Aspiring developer
Profile
Posts: 9
Reg: Jul 09, 2013
Hyderabad
1,640
07/17/13 07:21 AM (10 years ago)

How to create form which can contain the text controls

I am new here. I want to know how to I create a form/page using buzz touch where I can have text controls to accept the data and I can save that data on device. For example, I need form where user can enter the details about the product and I should be able save all the product details on the device. -Sudheer
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
07/17/13 08:34 AM (10 years ago)
Welcome @sudheer k! You might need a backend like a database like mysql then use php to communicate to the database. You could use sql but depending on how much you want to save. LA
 
sudheer k
Aspiring developer
Profile
Posts: 9
Reg: Jul 09, 2013
Hyderabad
1,640
like
07/17/13 09:38 AM (10 years ago)
I just want the data to be saved on device and not on the web server. What kind of a plugin should I use to layout my controls on the form. I could not find a suitable plugin. Thanks. -Sudheer
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
07/17/13 10:35 AM (10 years ago)
Well you could create a form by html and use the html url plugin. LA
 
sudheer k
Aspiring developer
Profile
Posts: 9
Reg: Jul 09, 2013
Hyderabad
1,640
like
07/17/13 10:39 AM (10 years ago)
Ya. Thanks for the response. I just discovered that. How do I store the data on the device? How I create database and store data ? This has to be on the device not on the server? User should be able to add records and app should retrieve all the saved records and present it to user.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
07/17/13 10:48 AM (10 years ago)
What platform IOS or Android? LA
 
sudheer k
Aspiring developer
Profile
Posts: 9
Reg: Jul 09, 2013
Hyderabad
1,640
like
07/17/13 10:49 AM (10 years ago)
Both.But will start with iOS.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
07/17/13 10:50 AM (10 years ago)
What type of data? LA
 
sudheer k
Aspiring developer
Profile
Posts: 9
Reg: Jul 09, 2013
Hyderabad
1,640
like
07/17/13 10:56 AM (10 years ago)
As an example, let's say I want to write application to store the details of all friends(similar to contacts). I want to capture the details like firstname, last name, date of birth, his interests etc. I need to store this data and I am not sure about the format Then I should be able retrieve the data from when it's been saved. In general application it's like storing and retrieving the data from database. Not sure how it works on iOS and Android and what API's are available.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
07/17/13 10:59 AM (10 years ago)
Not sure about IOS but for Android you can use sqlite which is already built in to it. Here is a link to it: http://developer.android.com/guide/topics/data/data-storage.html LA
 
sudheer k
Aspiring developer
Profile
Posts: 9
Reg: Jul 09, 2013
Hyderabad
1,640
like
07/17/13 10:59 AM (10 years ago)
As an example, let's say I want to write application to store the details of all friends(similar to contacts). I want to capture the details like firstname, last name, date of birth, his interests etc. I need to store this data and I am not sure about the format Then I should be able retrieve the data from when it's been saved. In general application it's like storing and retrieving the data from database. Not sure how it works on iOS and Android and what API's are available.
 
sudheer k
Aspiring developer
Profile
Posts: 9
Reg: Jul 09, 2013
Hyderabad
1,640
like
07/17/13 11:02 AM (10 years ago)
Thanks again. This is great. Now how do we use this API from the buzztouch? I mean , how can I take the data entered by user in html controls and insert the data into the database? Is there any sample application or video available to demo this?
 
ThomasB
Lost but trying
Profile
Posts: 162
Reg: Jun 23, 2011
Palo Alto
3,270
like
07/17/13 11:05 AM (10 years ago)
There is no built-in way to do this in Buzztouch that I know of. I create the form in an HTML/Jquery mobile, using form builders like Tiggzi.com or Codiqa.com. Then a custom PHP mobile to grab the data and plug it into MySQL. There is a Buzztouch compatible form builder in the works, from Chris Ruddell. Don't know when it will be approved for general community, but I think it will only be iOS initially.
 
sudheer k
Aspiring developer
Profile
Posts: 9
Reg: Jul 09, 2013
Hyderabad
1,640
like
07/17/13 11:05 AM (10 years ago)
Thanks again. This is great. Now how do we use this API from the buzztouch? I mean , how can I take the data entered by user in html controls and insert the data into the database? Is there any sample application or video available to demo this?
 
sudheer k
Aspiring developer
Profile
Posts: 9
Reg: Jul 09, 2013
Hyderabad
1,640
like
07/17/13 11:08 AM (10 years ago)
Do you have any sample application which users the jquerymobile/HTML grabs the data stores it in MySQL. I hope this is not on the server side.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/17/13 02:03 PM (10 years ago)
If it says 'MySQL' its on the server side. If you need to hold files locally, you can use either SQLite as a database, or you can create an old fashioned text file (which can actually be xml, json, whatever...). This project of yours sounds like you'll need to either create a new plugin, or customize an existing plugin to facilitate your requirements. You'll use the BT_filemanager to save your file, either text, image, whatever. I'd suggest using SQLite, so that you'll have a way of categorizing/filtering the data, but it's all up to you. Keep in mind Buzztouch is just more xcode. Or java, depending on if you're working on iOS or Android. Cheers! -- Smug
 
ThomasB
Lost but trying
Profile
Posts: 162
Reg: Jun 23, 2011
Palo Alto
3,270
like
07/17/13 08:25 PM (10 years ago)
I suggest you use Appery.io, which generates html code for forms. You need to hook it to SQL manually!
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
07/18/13 10:39 PM (10 years ago)
Try to use the techniques outlined in this article. It uses Dictionaries, which hold key-value pairs. Then it explains how to query the Dictionary for subsets. This might be a way to avoid full-on SQLite and to avoid a server-based database. http://www.cimgf.com/2013/02/05/querying-objective-c-data-collections/ At some point, you want to encourage the users to back-up their data ... perhaps to iTunes, to iCloud or to Dropbox, etc. Notice I avoided the "sync" word, which is another level of complexity! :-) -- Niraj
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.