Search code examples
google-app-maker

Get input data of Suggest Box in App Maker


I have Suggest Box widget and I need to make suggestions based on several fields. App Maker allows only use 1 field for suggestions, so I need to implement custom "suggest" function.

I am binding to onInputChange(widget, event) to get current input, but there is no input data.

How can I retreive user's input in suggest box widget?


Solution

  • You can access Suggest Box widget input using event.srcElement.value:

    function suggestBoxInputChange(widget, event)
    {
      console.log(event.srcElement.value);
    }