Add texbox

Hi Mendix Community,   I would like the mendix textbox to automatically highlight the text when clicking on the input field.   Is there any way I can add the onclick="" to the textbox html on runtime?   Regards, Vincent
2 answers

Hi Vincent

You can use js to do that . Add a html snippet or javascript snippet to the page and select the textbox using a class. Then write your js there to do the work.


Hope this helps !


Hi Vincent,

if you are thinking in a way of higlighting your text-box on the onClick where it shows differ than other boxes which are in not in focused state you can use the below code for achieving it through CSS add the class to your particular field and apply the class as the parent for the below code

it works


.form-control:not([readonly]):focus {

  1. border-color: your own color;



hope this helps you.