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

Discussion in 'iOS Questions' started by davepamn, Mar 6, 2015.

  1. davepamn

    davepamn Active Member Licensed User

    I need an action sheet to receive an input typed in from the User.
     
  2. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    Hi.
    What do you mean?
     
  3. davepamn

    davepamn Active Member Licensed User

    I want an input dialog
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You can use a regular panel and show it above all views.
     
  5. davepamn

    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.
     
  6. Brian Robinson

    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
     

    Attached Files:

    stingrae and Erel like this.
  7. davepamn

    davepamn Active Member Licensed User

    Thanks
     
  8. davepamn

    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.
     
  9. Brian Robinson

    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
     
  10. davepamn

    davepamn Active Member Licensed User

    I downloaded the sample code, built a release, and ran it on the iPad
     
  11. Brian Robinson

    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
     
  12. Brian Robinson

    Brian Robinson Active Member Licensed User

  13. davepamn

    davepamn Active Member Licensed User

    I don't know why it doesn't work

    My iSideMenu is not working, either.
     
    Last edited: Mar 23, 2015
  14. Brian Robinson

    Brian Robinson Active Member Licensed User

    Sorry, without seeing some code, not sure how I can help.

    Cheers
    Brian
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice