Functions on inputfield at "blur" and "focus"

Fredolino 13 Mar, 2019
Hi,
I want to give my input field this class:
<input class = "geolocs leaflet-locpicker">
and the input field gets to it
2 event actions:
-&nbsp;1. function on "blur": function (e) {e.preventDefault (); var p = e.relatedTarget; ...}
-&nbsp;2. function&nbsp;on "focus": function (e) {e.preventDefault (); self.openMap (); }

These functions are in an external javascript file which I load under "Setup" with a "Custom code":
<script src = "templates / protostar / js / src / leaflet-locationpicker.js"> </ script>

I tried to get some information about the search but the search is always aborted ...

How do I get the classes into the input field? And where can I find the options "blur" and "focus"?
The javascript creates a pop-up with a map on "focus". I'm not sure if I have to change the javascript and make a div with "custom code" under "setup" ...

For helpful information, as is now the case with CF 6, I would be very grateful.

many Greetings
F.

Functions on inputfield at
Fredolino 13 Mar, 2019
ok :-)

i have the class in input field under advanced attribute now:
class:geolocs
class:leaflet-locpicker
Fredolino 13 Mar, 2019
I think post is solved (?)

in the textfield Events:
3x Action: function
Element identifier: blur
Element identifier: focus
Element identifier: input

i hope this is ok... :-)
healyhatman 13 Mar, 2019
class: geolocs leaflet-locpicker
Don't need a new line for each.
For the element identifier, that takes a multiline list so you only need one action and the 3 identifiers.
Fredolino 14 Mar, 2019
Hi,

Thanks for the information. :-)
I have made the changes.
I have now only once the function and the 3 element identifier.
At "On" I entered "Change".

many Greetings
F.Functions on inputfield at
This topic is locked and no more replies can be posted.