Get the html/javascript widget from the appstore.
This will allow you to use jquery to add on click events to elements, for example:
$("#the id of the element").on("click", function(){ myFunction(); });
Then in the function target the element for the textbox search to change it’s value.
something like
$('input[name=name of the widget]').val('your value here');