I am trying to implement some sort of javascript functionality onto a field situated in an edit view.
However, it seems like I cannot call any of the global variables in my custom php script such as the db.
What am I doing wrong?
Here’s there editview.js I am using and have allocated to the metadata of the editview vardefs in the custom folder:
I also tried to call the log in order to put out anything but that does also not work.
what do I need to import/include/require other than what I already do?
When I echo something like ["Test1, “Test2”, “Test3”] it does indeed work. But I need access to my db.
The system does recognize the entry point when I try to access the php via url. It puts out that an array was echo’ed. If I change the echo up into vardump it even returns the array, I would be looking for.
So it seems that the integration into the javascript prohibits the search.php from accessing the global variables and therefore also the database. Is this maybe some kind of security measurement?
Would there be any other way to integrate autocomplete functionality onto a field based on the current values from the database?
Ah, yes of course. That was a typo on my part, sorry about that. Just forget the “/Extention/” before Application.
I did however indeed put it exactly in the right folder before running QRR.
I am not sure if this will work. If not I recommend that, instead of doing it in a different way, you should follow exactly as explained in the manual page shared by @pgr
(you have changed several things so it may not work unless you know precisely what you are doing!)
It did work in the end! Thank you so much!
However, it also proved to be very useful to clear the cache and browsing data from time to time.
How much more complicated would it be to do a regular REST call onto the API?
It seems to me that it’s just a dirty version of a functionality that is actually already given if I am not mistaken.