Hi, there is a bug when you combine Autocomplete with a Callback:
- You insert a new record
- 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
Your Answer