iOS Question How can I create an input form to receive a user value?

davepamn

Active Member
Licensed User
Can you provide a code sample?

I was thinking about creating a regular page with a text box on it. I would take up the whole screen. I want am input dialogue instead.
 

Brian Robinson

Active Member
Licensed User
Hi davepamn.

I modified fillipo's excellent custom dialog class to suit my own purposes for this found here http://www.b4x.com/android/forum/threads/class-customdialog.47778/#content

I have added an example with the class and how to use it.

I can explain anything that you need to know, but basically I add a panel to the dialog and add the controls to that panel. Any controls that you want to get the return value for, then add a tag to it. The button_click of the dialog returns all the values in a map with the tags so that you can iterate over them to get the results. There are definitely much better ways to achieve this, but I decided on quick and dirty for now.

Cheers
Brian
 

Attachments

davepamn

Active Member
Licensed User
I ran the sample

A dialog panel appears with a label and textbox for inputting a value.

When i press the Ok or Cancel button, nothing happens. The dialog does not go away.
 

Brian Robinson

Active Member
Licensed User
Ok... It is supposed to close the dialog, and then shows a message box with the values returned from the dialog.

Did you just run the example exactly as it was, or did you add fields to match how you want it?

Cheers
Brian
 

Brian Robinson

Active Member
Licensed User
Hi davepamn,

I just downloaded what I uploaded to make sure I didn't miss anything when I uploaded the zip file and ran it on an iPhone and iPad mini. It worked fine on both of those. If anyone else is reading this thread, can you give it a try and see if it works for you?

Cheers
Brian
 

davepamn

Active Member
Licensed User
I don't know why it doesn't work

My iSideMenu is not working, either.
 
Last edited:
Top