Jump to content

Autocomplete field reset via JS


Mackski
 Share

Recommended Posts

I'm using a page reference autocomplete field in a template as a "lookup" then populating other fields via ajax call.
I want to reset the autocomplete on success, i've tried a few things but the value still persists..

What i've tried:

$('#Inputfield_search).val('') // no effect
$('#Inputfield_search).data('selectedlabel',''); // no effect

I guess last resort would be to trigger the (X) on the autocomplete input.

Is there an easier way to reset this field type via JS?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...