Skip to main content
← Data, API & Backend
Data, API & Backend December 19, 2023 · 1 reply

Send Post Request from Form without Inputs

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

Hey everyone,

I’m trying to select a customer from a list of customers in order to enter that customer into a sale (sale recorded in backend).

However, Bravo won’t let me have a submit button tied to a post request (to send the user ID to the backend) without user inputs, meaning the submit button only works if it’s a form.

Is there a way to let my backend know which customer I’m clicking on without a detail page?

TIA!

Ken

1 reply

Stéphan December 24, 2023

Hello Ken Book !
 
If I understand your request correctly, you want to automate the customer purchase process, triggering a sale in your database. Let's examine the current functionality of Bravo in relation to these possible options, and see what possibilities exist based on the configuration of your database or project. We will need the following methods:

1. **Post for the form:**
   Use the Post method to create an automated form with default values synchronized between the screen elements in Bravo Studio and the database. The form should contain information such as name, email, etc., and especially a unique identifier (ID). This ID will be generated automatically after configuration with Bravo Studio. This information will be retrieved by the Get method in your database.

2. **Get to retrieve form data:**
   The Get method can be used to retrieve form data and display it on a screen, thereby constituting the user's profile page (identifier, name, surname, etc.).

3. **Patch for modifications or updates:**
   The Patch method can be used to make modifications or updates to the retrieved data, based on the unique identifier of the user. It will serve as automation through default user values obtained via Get.

It is crucial that during registration, the user provides information such as name, email, etc., as well as a automatically regenerated unique identifier, as multiple people may share the same information, and only the ID will differentiate them. This ID will be automatically regenerated after configuration with Bravo Studio.

Subsequently, a modification screen can be set up using the Patch method, where the values of registration data will be retrieved by default using the Get method. Thus, modification can be done on a specific element using the user's identifier with a single click.

Regarding the resolution of your issue, you can either link your sales to an external payment API with a WebView or Stripe for enhanced fluidity. Alternatively, you can trigger the sale through a sales form with a unique identifier created for each buyer, or manually in the database, knowing the user's identifier obtained during registration.

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord