PDA

View Full Version : iPhone Form Controls - Please Help



me_myself
05-20-2010, 08:16 PM
My company wants me to a website which will work in iphone. I've got the basic framework ready - have question on couple of iPhone form controls.

1. There is a field to upload captured image. Field engineers will capture the image using iphone's camera and upload it to our webserver using this control - how do i do this? Can i have a "file browse" button to browse for the file (like windows explorer or is there any specific field for this?)

2. How will dropdown select box work in iphone - you have to scroll the select box content - when you scroll it using your hand, will it scroll the listings or the page as a whole?

Please help.

Thanks a lot in advance.

djr33
05-20-2010, 09:26 PM
1. Nope. I just tried this on my iphone and (from just looking at a couple pages quickly), ANY 'file' input is grayed out-- you just can't use it. It displays there, but clicking it does nothing.

2. Dropdown (select) inputs work just fine: a small window overlays at the bottom of the screen with all of the text choices zoomed in, in a scrollable little display. You pick one (by tapping it), then you can go back to the rest of the form (in the normal view). One note: I do not believe that you can select multiple options (as you can using shift on a computer).


(2) won't be a problem for you. (1) will be. I'm not even sure if it's possible outside of an iphone app.

I'd suggest that if you need more help with this you should post on some forums for the iphone, though I don't have a specific suggestion.


By the way, you can email photos taken from the camera, so if you wanted to go to the trouble of setting up an automated mail server, this would be one way to 'upload' images.


Note: this was posted in Javascript, but the question is just about HTML. It has been moved.

me_myself
05-20-2010, 09:29 PM
Thanks a lot for the reply.

Do you know if there are any calendar control (picker) for iphone? Does the normal calendar picker js we use for regular websites work in iphone?

Thanks.

djr33
05-20-2010, 09:38 PM
What do you mean exactly? Like on travel websites where you pick a date in a small div that appears next to the field?

There's no reason this won't work on iphones-- they use the full version of Safari and it's Javascript. HOWEVER, the problem is that it may not be EASY to use for an iphone user. The main problem is that it doesn't differentiate between a click and a hover.
I think that sort of menu might work, but it would need to be designed well.

You shouldn't be designing this if you don't have access to an iphone (since all of your employees will have them-- so I'd suggest borrowing one for development). If you do have/acquire one, then you can just use trial and error to figure it out.

In general everything works on the iphone with two common exceptions (among other smaller things):
1. Hover and drag do not work (there's just no way to perform this). Menus that require either of these (usually hover) will not function. If you can use a click instead, it will be fine.
2. Flash doesn't work, and won't work (apple is protesting against flash, apparently).
(3. also, we just found out that file inputs won't work, but that makes sense, since the iphone has a hidden filesystem-- I wish they'd change that...)



Despite all of these problems, however, remember that you do have another option with a LOT more control and potential than an iphone website: develop an iphone app and you can do anything you want including using the camera and internet connection.

me_myself
05-21-2010, 07:48 PM
yes - the date picker js where you click a small icon a popup with month/day displays and you've got to select a date.

I've decided to go with date prefilled in an input field.

Thanks a lot for your help.