This little tutorial will show you how to "GET" your data from a Form (Beta) block and display it in your app.



Steps to take:


  1. Add a Form(beta) block.
  2. Add your controls to the screen.
  3. The locationpicker we have to connect manually.
  4. Go to the Developer Tab


  • Services
    • Data
      • Input parameters
        • Body


  1.  Enter the name of your locationPicker control (default is the name is Locationpicker1)



 


You will see 3 fields already filled in, we just need to enter the locationpicker and the default value is the {gps:latitude}, {gps:longitude}


This will use your phone’s GPS as the input for the control.



 


You can also decide if you want some controls to be “required” before sending the form.


If you check the box, the form will NOT send if that field is not filled in and the user will get an warning. ( red border around the control ).


  1.  Now we have connected our controls from our form.
  2.  Fill in your email address in the Advanced tab of your Form block.



  1.  Alright we are done with setting up the form. Next up is sending some data. So just fill in the Form and press submit.
  2. Check if you have some data in the DATA tab of your Form.



 



Now we want to show that data in another block in our app.

 


Steps to take:

  1. Add a web service block
  2. Select AppMachine API


  1.  Select “Returns data from data store”



    Fill in the name of your form block (In our case this is Form (beta))


 


NOTE: Changing the name of your Form (beta) block at a later time will also cause the datastore name to be changed. 



Click Next and select the node “root”.


 


Click Next and name your block.


 


Our app structure will look like this and we are done. This is how you return the data from your form block. You can place a Lock Block above the Get Form Data block to prevent unwanted access of course.