Skip to main content
← Design & Bravo Tags
Design & Bravo Tags November 12, 2021 · 1 reply

Couple of questions about the forms

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

1) Form validation

Is it possible to validate form inputs?

For a start, checking if empty (so basically making inputs required) would be enough for me. Especially that I've noticed that the new [component:input-select] already notify users that it's required when left empty.

Unfortunately, all the other form tags either allow empty inputs or throw an error (number tag for example).

2) Data binding options

Why is it possible to bind Value and Input Destination to layers tagged as [component:input-x]? Meaning, what's the use case for it?

I've been trying to bind data through Value as an input placeholder that could be then sent using Input Destination but unfortunately, I wasn't able to make it work yet.

Edit: I finally figure it out - one use case I was able to make work is Patch request (editing). So first I bind Values (from the Details) and then I submit my changes through the Input Destination.

Previously I was using Values from a completely different Airtable table using separate a request so maybe the problem was somewhere there. I will try it again when I will have a moment.

3) Form structure

To figure this one out, it really took me at least a few hours.

It seems that it's required to have [action:submit] in the same [container] as the rest of the form to make it work but I don't think it's really mentioned anywhere in the documentation or YouTube tutorials.

When submit and inputs are in different containers, the result of the submit will be an empty row (might be a reason for this post) which means that something like this is not possible:

  • form [container]
    • inputs go here
  • floating-action [layer]
    • button [action:submit]

1 reply

Javier Felipe Bravo team November 21, 2021

Hi  :)

Form validation is not possible at the moment (only if you do that in the backend). Thanks for your request and for describing the use case, we'll consider it for future product updates.

Regarding form structure, as you say, it's necessary to put all the inputs and the submit action inside the same container (we'll try to make it more obvious in the documentation). Therefore, using a [layer] component for a submit action wouldn't be possible at this moment. We'll also have this in mind for future releases.

Thanks for your message!

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