Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Input field address options dynamic from API

I'm currently building out an address change form that will supply the user with suggested addresses. I have an API that will be fed the address as the user types it in and returns 5 to 10 address suggestions, then when the user selects one of the addresses, it will complete the rest of the form.

I was going to investigate using the Dropdown Select component and fill the options with the return from the API or is there a way to use the regular q2-input and display the suggestions below the regular input field?Screenshot 2021-12-15 155527.jpg

Posted 4 years ago
Votes Newest

Answers


Yes, this is possible. Our recommendation would be to use the q2-select element with Robust Option Content. This would allow you to display a fully formatted address, then when the user selects an option you can dynamically update the other fields in the form to their respective values. This would also keep the form's appearance cohesive with the rest of the app. This could be dynamically done with pure javascript and Jquery, but I recommend using a frontend framework like React.

Posted 4 years ago
Trey Teter
124 × 2 Administrator
126 Views
1 Answer
4 years ago
4 years ago
Tags