Skip to content

How to populate one dropdwon upon selection of value in another dropdown? #249

Open
@tvsathish

Description

@tvsathish

Hi,

I have a select dropdown that must be populated on the selection of another dropdown. I use FormFieldSelect, how to detect the change of value and populate the other dropdown accordingly?

               c.Form(form_fields=[
                        FormFieldSelect(
                            name=f"Component",
                            title="Component",
                            options=str_list_to_select_options_list('component', Component.fetch_values()),
                            required=True
                        ),
                        FormFieldSelect(
                            name=f"SubComponent",
                            title="SubComponent",
                            options=list_of_subcomponents(selected_component),
                            required=True
                        ),
                    ],
                    method="GET",
                    submit_url="."
                ),

How should we populate a text area, at the bottom of the page (but is not part of the form) with the results of the Submit call?

Thanks and regards,

Paddy

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions