I am working on my project and I followed your suggestion. However, the field that I need to change is a date time, so I need to wait for the user to fish selecting the date and time.
Is that it executes for every change the user makes. Which is not the behaviour that I need. I need the Ajax call to be done after the user has finished entering the date and time
Since in the documention it is written that it is possible to use plain JavaScript and JQuery, I am trying the following:
var formId=document.forms[0];
var startTimeElement=formId.querySelector('input[name="startTime"]');
startTimeElement.addEventListener('blur',handleBlur);
function handleBlur(event){
// Ajax call
alert('This is a test')
}
Unfortunately, so far the "handleBlur" function doesn't even get called, I do not know why.
I will appreciate it if you have any suggestions/observations.
Hi @jcastroa87 ,
I am working on my project and I followed your suggestion. However, the field that I need to change is a date time, so I need to wait for the user to fish selecting the date and time.
The problem I am having with:
Is that it executes for every change the user makes. Which is not the behaviour that I need. I need the Ajax call to be done after the user has finished entering the date and time
Since in the documention it is written that it is possible to use plain JavaScript and JQuery, I am trying the following:
In the setupCreateOperation I added :
In the JS file I have:
Unfortunately, so far the "handleBlur" function doesn't even get called, I do not know why.
I will appreciate it if you have any suggestions/observations.
Once again, many thanks.
Alon.
Originally posted by @AlonMoshe in https://github.com/Laravel-Backpack/community-forum/discussions/1005#discussioncomment-9718327