Populating a Retool form with data from a REST API

Hi there :wave:,

Is it possible to interact or use a REST API to populate or enrich a Retool form? I can do something like this in retool apps, but wanted to see if the Retool form was also able to do this.

For example:
I want to pull the options for a select box from a REST API response. I realise you can populate fields by URL params, I'm just wondering if we can do this through a REST API.

Build standalone forms

1 Like

Hi,

you can populate a retool select component with a query result. Just use the "Mapped" mode, set a data source to your REST query and make sure that the result from the REST API are transformed in a way that the select component can use it (similar to what you would need to display it in a table component)

2 Likes

I believe that screenshot you're showing is from a retool web app, not from a retool form
Firefox - Apps  Retool 2024-08-01 at 09.37.30

These are the sources I have available (even though I have REST queries configured, which is only the database.

1 Like

Ah, sorry, I missed that you were specifically asking about retool forms. Sorry, never used them.

1 Like

Hey there! I'm moving this to feature requests for now :disappointed:

We're collecting requests to integrate more queries & resource types !

1 Like

This is a great idea. Unfortunately, Retool Forms is the weakest part of Retool right now, even though it has such huge potential. Seems like they abandoned it and hid some key features behind enterprise or require you to use the form in actual app. They don't seem to realize that for most applications, just having a standalone form, outside of an app, is super useful and powerful. If they just implemented a few simple things, Forms could power huge growth for Retool because it is simply unbelievable how the Form automatically hooks up a postgres database and can be connected to a workflow.

Thanks for taking a look @Tess

1 Like