Server side form select search


Topic: Server side form select search

Randy Deborggraeve pro premium priority asked 7 hours ago

During development of a website using golang html/templates, we are trying to create an auto complete form dropdown.

Is there any java snippet available to get the data from API when typing in the searchbox? We don't want to fill the options here during SSR as there might be a few thousand items available, so instead we want to show a limited number of items matching the search input.

<div>
                            <label class="form-label fw-bold small" for="parentCategory">{{ t .Localization "lbl_product_category_parent" }}</label>
                            <select id="parentCategory" 
                                    name="parentId" 
                                    class="form-select"
                                    data-mdb-select-init
                                    data-mdb-filter="true"
                                    data-mdb-placeholder="{{ t .Localization "lbl_product_category_parent_select" }}"
                            >
                                <option value="">{{ t .Localization "lbl_product_category_parent_none" }}</option>
                                {{ if .Data.ParentId }}
                                    <option value="{{ .Data.ParentId }}" selected>
                                        {{ .Data.ParentName }}
                                    </option>
                                {{ end }}
                            </select>
                        </div>

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Open

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 9.3.0
  • Device: Any
  • Browser: Any
  • OS: Any
  • Provided sample code: No
  • Provided link: No