LogoLogo
  • Adapptio User Documentation
  • Getting Started
    • Quickstart
    • Architecture Overview
      • Views
      • Actions
      • Integrations
      • API Endpoints
      • Routes
      • Events
      • Assets
    • Editor
      • Main Menu
        • Create New Resources
        • Manage the Application
        • Monitoring Errors
      • Main Toolbar
        • Deploying the Application
        • Opening the Application
        • Preview Mode
        • Error Monitor
      • Components Panel
        • Components
        • Inspector
        • View Settings
      • Outline Panel
        • Data Variables
          • State Variable
          • Data From Action
      • Data Explorer
      • Console
    • Playground
  • Working with Adapptio
    • Best Practices
    • Tutorials
      • 1. Hello World
      • 2. Visualize Data from API
      • 3. Advanced Layout Application
      • 4. Application with In-Memory Database
    • How To
      • Custom Auth
      • Action Logic
        • Transform Node
      • UI Logic
        • Logout
        • Conditional Render
        • One Of
      • Data & Dynamic values
        • Custom Variable
        • Data from Action
        • Dynamic Value
        • Change Value from Event
        • Loading Data from Action to Form
        • Sending Data to Action from a Form
        • Server-side Dropdown Autocompletion
      • Visual
        • Styling Icon Button
      • Layouts
        • Centered Box
        • Header & Sidebar Layout
        • Grid Form Layout
        • Stretched Layout in Row
    • Components
      • Composed Chart
      • Advanced Table
      • Custom Component
    • Examples of Applications
      • SaaS Platforms
      • Customers Portals
      • Information Systems
      • Internal Tools
        • Color Picker
      • IoT Applications
      • Smart Portals
      • Analytics & Calculators
      • Statistics & Monitoring Panels
      • API Data Visualization
      • Simple Games
  • DEPLOYMENT
    • Cloud Hosted
    • Self Hosted
  • REFERENCE GUIDE
    • Components List
      • Application Header
      • Box
      • Container
      • Grid
      • Sidebar Layout
      • View
      • Text Input
      • Number
      • Checkbox
      • Option
      • Date and Time
      • File Upload
    • Properties
      • ACCEPT
      • CUSTOM PLACEHOLDER
      • DESCRIPTION
      • ENABLED
      • FONT SIZE
      • FOREGROUND COLOR
      • FORM DATA KEY
      • HEADERS
      • ICON
      • ID
      • LABEL
      • METHOD
      • MULTIPLE
      • MAX FILE SIZE
      • REQUEST TIMEOUT
      • REQUIRED
      • READ-ONLY
      • SIZE
      • TEXT ALIGNMENT
      • TEXT STYLE
      • URL
      • UPLOAD IMMEDIATELY
      • VALIDATE
      • VALUE
    • Functions
      • Array
      • Date
      • Generators
      • JSON
      • Logic
      • Math
      • Object
      • String
      • Types
      • Util
  • Support
    • Get in touch
    • Release Notes
  • Legal
    • Terms and Conditions
    • GDPR
Powered by GitBook
On this page
  • The Goal
  • What We Are Going to Do
  • 1. Create an Action
  • 2. Design a Basic Form
  • 3. Binding a Button with Action
  • The Conclusion

Was this helpful?

  1. Working with Adapptio
  2. How To
  3. Data & Dynamic values

Sending Data to Action from a Form

PreviousLoading Data from Action to FormNextServer-side Dropdown Autocompletion

Last updated 3 years ago

Was this helpful?

The Goal

Send data from form components to action by triggering a button event.

What We Are Going to Do

1. Create an Action

First, lets create blank action with fixed input parameters.

  1. From the Main Menu, create a new Action and name it updateTask.

  2. In the Outline panel add three parameters by clicking on the Plus button.

    1. Rename the parameters on id, name, and content.

    2. Set up properties of id to Integer in the Inspector panel, and switch Required to true. It makes the parameter mandatory.

    3. Leave the name and content configure to String.

  3. All available parameters are visible in the Tester panel, where a yellow warning shows mandatory blank parameters. In our case id.

  4. Try filling some values in the testing parameters corresponding to the value-type and clicking the Save & Run button.

  5. If the input parameters are valid Tester output will returns following:

status: "LOADED"
output: null

2. Design a Basic Form

Design a basic form containing Text Input and Text Field components.

  1. Put a Container on the canvas work-field and name it container1.

  2. Set up its layout on Stretch with horizontal alignment at right.

  3. Place Text Input intocontainer1, name itfldName, and set up its Label on 'name'.

  4. The next component placed will be a Text Area, named fldContent, and labeled 'content'

  5. Values of fldName are set up task.data.name; fldContent value is task.data.content.

3. Binding a Button with Action

Clicking the new button triggers an event bound with our action.

  1. Place a new Button component into container1 and name it button1.

  2. Design it as you wish, or leave it at the Default.

  3. Switch from Options to Event panel in the Inspector and clicking on the 'click' option will open the Event editor.

  4. Drag & Drop Call Action component to Flow canvas and wire it together with Event Start.

  5. Selecting the Call Action component allows us to define its attributes in Inspector.

  6. Click on 'Click to select' and choose updateTask action.

  7. Blank parameters will appear at Inspector that moment.

    1. Set up parameters Values on the following: id -> task.data.id; name -> fldName.value; content -> fldContent.value

  8. We are done! Data will be sent to the action by clicking on the button1 in Preview mode or after Application deployment.

The Conclusion

This method is commonly used to reference any outgoing forms or other components values referenced to action.

Values of both components can be filled as a constant or mapped by action from the previous ; what is exactly our case here.

Loading Data Tutorial
Form for sending filled data