Skip to content

Missing in the documentation: How to preset multiple default values on "select" form fields? #649

Closed
@mesr

Description

@mesr

How to preset multiple default values on form fields that allow it seems neither clear nor trivial.

For instance, the reference page for the "Form" component (https://sql.datapage.app/component.sql?component=form), under the title "Example 5", shows a "select" field with two preset values ("Orange" and "Banana"), but no indication is provided as to how this can be achieved.

I personally tried setting the "value" parameter of "select" form fields to a JSON array, a JSON object with "value" keys, an SQL array, an SQL set, as well as multiple individual "value" parameters, and none of those formats have given the expected result.

Could the code sample of that example be completed with the inclusion of the "value" parameter? This would be of great help!

Please and thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions