Skip to content

Question: Handling html select with single or multiple select #68

@jerrybroughton

Description

@jerrybroughton

Is there an external library or something I am missing that allows taking a struct from a database representing a list of <options in an HTML template and setting the one selected in the case of a single select dropdown, or multiple selected and handling that in an html template. What do you usually do in your framework to support this.

For example, in a simple example, I may have a table called color that I have columns of ID and color_name, with 1-red, 2-blue, etc. I want to have a <select with the options from this lookup table but my actual data is lets say a table that has my favorite color and other preferences. I would want to on CREATE.. in the template allow them to choose from that color list and on UPDATE show what I selected before in the list and allow it to be changed. I might have MANY of these lookup boxes.

in WebApps, this is very common, and so I was wondering if this was baked in someplace and I missed it or if you have someway you usually do this.

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