LogoLogo
  • A better way to do...stuff!
  • How we build the app
    • Overview
  • Documentation
    • Draftbit
      • Using Live Preview
      • Workspaces and Billing
      • Introduction to the Builder
      • Layout
      • Intro to Navigation
      • Fetching Data
      • Direct Integrations
      • FAQs
      • Draftbit
      • Draftbit
      • Custom Blocks
      • Borders, Background, and Elevation
      • Actions
      • Custom Screen Code
      • Exporting and Publishing Your Project
      • Sharing Your Project Online
      • Publishing Your App as a PWA
      • Stack Navigator
      • Tab Navigator
      • Draftbit
      • Draftbit
      • Basic
      • Media
      • REST Services & Endpoints
      • REST API Integrations
      • Themes & Styling
      • Submitting Data
      • Draftbit
      • Draftbit
    • Xano
      • resources-and-tips-1
        • 🎞️ Xano Video Tutorials
        • 🤝Community Corner
        • 💰Share Xano. Make money
      • FAQ
      • getting-started
        • ⚡ Jumpstart
        • 🎞️ The Xano Interface
      • instances
        • What is an Instance?
        • Early Access Instance
        • Upgrading an Instance
        • Sharing
        • Bandwidth Usage
        • API Rate Limit
      • What is a Workspace?
      • Dashboard
      • Database
      • Airtable Import
      • API
      • Library
      • Marketplace
      • Settings
      • authentication
        • Authentication
        • Sign-up & Log in
      • data-manipulation
        • The Function Stack
        • Addons (GraphQL-Like)
        • The Expression Builder
        • External Query Manipulation
        • Timestamp
        • Filters
        • Images
    • Expo
      • Creating your first build - Expo Documentation
    • Kommunicate
      • Installation
      • Installation
      • Installation
      • Installation
      • Installation
      • Flutter Installation
      • Installation
      • Zapier Integration
      • Authentication
      • CMS Installation
      • Authentication
      • Conversation
      • Conversation Assignment
      • Customization
      • Localization
      • Logout
      • Web Troubleshooting
      • Installation
      • Authentication
      • Push Notification
      • Conversation
      • Customization
      • Localization
      • Logout
      • Installation
      • Authentication
      • Push Notification
      • Conversation
      • Customization
    • Formito
      • basics
        • Getting Started
        • Variables
        • Are you GDPR ready?
        • How to prefill the values of my chatbot?
      • connect
        • How to connect Formito to Zapier?
      • convert
        • How to convert old formito chatbots to the new version?
        • How to convert Google Forms into a chatbot?
        • How to convert a Monday.com board to a chatbot?
        • How to create chatbot from QuickBase table?
      • guide
        • How to add my chatbot to WordPress?
        • How to create a chatbot for Zendesk?
      • shopify
        • How to embed my chatbot into a Shopify page?
        • How to display Formito chatbot on bottom corner of my Shopify store?
        • How to open my chatbot after clicking on links or buttons?
    • Stonly
  • Flex Stuff
    • App
    • APIs
    • Database
    • Website
    • Design
    • Style Guide
  • Content
    • Guides
    • ChatBots
    • Blogs
    • Whitepapers
  • Company
    • About us
    • Brand
    • Roadmap
    • Policies
  • Flex Together
    • Overview
    • Fair Finance
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. Draftbit

Submitting Data

PreviousThemes & StylingNextDraftbit

Last updated 4 years ago

Was this helpful?

You can configure and to submit data (ie. make a POST request). This configuration will be completed in the Interactions Tab.

You can use any component that contains a Field Name prop to log user input and submit data. This list of components currently includes:

🚧Make sure that the you have the API you'd like to submit data to set up in the APIs/Services menu.

For documentation purposes, we'll be using Draftbit's service. You can find instructions on how to connect an API to Draftbit .

When configuring the Base URL make sure you leave out the exact endpoint. You will add the endpoint later inside of the Configure Data Submission modal.

Once you have:

  • a component with a Field Name prop

  • a Button or Touchable

  • a Service and Endpoint configured in the Data tab

you will be ready to set your screen up for submitting data.

Once you've created a in the Data tab, you'll be prompted to create a new endpoint. When you create your endpoint, make sure to select POST from the Method dropdown next to the Endpoint input.

After selecting the POST method, you'll see 3 new headers appear on the right-hand side of the modal: Body Structure, Body Preview, and Test Response. Configure your body directly in the Body Structure section in {{variable}} notation. If you select the Body header on the left-hand side of the modal, you'll see an area for you to enter a test value for each key/value pair.

Once you've entered all your key/value pairs, select the Body Preview tab to see what your response will look like populated with the test values you entered, and make sure your Body Structure is valid.

Last, you can Test your request in the Test Response tab at the end. Once you've successfully tested the request, you can attach the action to your Button/Touchable.

Once your components, Service, and Endpoint are set up correctly, you can select the Button/Touchable you would like to handle data submission and select the Submit Data option from the Actions dropdown in the Interactions tab.

Two dropdowns will appear for you to select your Service and Endpoint. After you've made your selections, a Configuration section will appear and there will be an input for each key/value pair you defined in your Body Structure. The dropdown next to each variable will be pre-populated with all the Field Names you have set on the screen. Select the corresponding dropdown that matches your variable.

🚧

Test the feature out by entering some data in an input, and then submit the data to the Example Data API (You can do this in either the browser or on your phone in Live Preview).

📘

Remember that any data submitted in a POST request to the Example Data API will eventually disappear from the dataset. This service is meant to be used for testing purposes only!

What's Next

If you'd like more help with sending data, check out some of our tutorials.

Please note: We utilize lodash to handle generating the proper body for submitting data. For more information on this syntax, check out the documentation .

Updated 4 months ago

Buttons
Touchables
Text Input
Text Area/Text Field
Checkbox
Slider
Radio Button Group
Example Data
here
Service
here
Table of Contents
Introduction
Setup
Configuring your Endpoint and Body
Configuring your Button/Touchable