Solution for Autocomplete: If you combine Autocomplete with a Callback

QuestionsSolution for Autocomplete: If you combine Autocomplete with a Callback
c3media asked 1 month ago

Hi, there is a bug when you combine Autocomplete with a Callback:

  1. You insert a new record
  2. When you try to insert a new record, the past value stay in your form and Get Error

Solution:

$grid[“add_options”][“afterComplete”] = “function(response, postdata, formid)
{
setTimeout(function(){
// Clear all text fields and text area after saving
$(‘input[type=text], textarea’).val(”);

// Reset selects to default value
$(‘select’).prop(‘selectedIndex’, 0);

// Reset autocomplete field
$(‘#YouAutocompleteField’).autocomplete(‘search’, ”);

}, 100);
}”;

 

Regards

1 Answers
Abu answered 3 weeks ago

Thanks for reporting.

I am unable to generate this case however it may help others.

Your Answer

6 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?