Reputation: 3713
I'm using MagicSuggest in my forms, and found myself in cases where i need to destroy it and restore the input field.. went through the whole documentation, can't seem to find a way to do this...
regards
Upvotes: 1
Views: 645
Reputation: 11
yes you are right. There is no easy way to revert the MagicSuggest field instance.
However, with jQuery, you can just remove the MagicSuggest DOM element, and replace the exact same input field to the correct position, and so it is "restored".
You can also get the MagicSuggest value before you completely remove the DOM element, and insert the value to the original input field.
You will also need to fix the CSS if needed.
Upvotes: 0