I have a form with one field that acts as autocomplete. If the user enters a word and presses enter, the content of the field should be added to a list below the field.
Prevent a form from submittion on enter or by clicking a button
button
provoked($event) { $event.preventDefault() }
in case if you need to pass data to the method, then try
provoked($event, data) { $event.preventDefault() // process the data here }