Input format for Form component

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets, and reproduction steps)

I want to use dynamic value for the Form component OR to point it toward a view rather than a table in my supabase instance.

What have you tried so far? (please link relevant docs and other forum posts)

  1. I have tried manually inputting the desired columns into the code editor. It shows the correct label but omits the input field:

  2. I have created a view that dynamically assembles the table I need in order to point the Form component directly to it (the view is unimaginatively called ‘test_view’). But while I can reference it in a state variable, for example, the view is not included in the Table component’s ‘Connect to table’ drop-down (note: I also have a Test table, but that is not the same thing).

So I am a bit stuck. If given a choice I would prefer to be able to connect to the view directly, but writing some js code to structure the dynamic value in code editor is ok as well.

Relevant links:

Hello @alexander_eliseev. Mapping views is something we have mapped for improvements but is still not close to being launched.

For the dynamic fields prop, it needs an array of {label: "string", name: "string", inputType: "Text" | "Number", etc}. You would need to manually add it, or you can create a custom postgres query that gets the view schema in this format for you.

You can read more about forms here Creating forms | Learn Plasmic

So I have tried just copying the array you provided (slightly modified) into the form object and it returns an error :frowning:

Oh, I didn’t add the [] on the array because I was just specifying the types,

It should be:

[{label: “string”, name: “string”, inputType: “Text”}]

thank you!