Hello,
I want my form to highlight the field that currently has the focus. I am able to do this for a single text input using the below CSS -
body #gform_wrapper_36 .gform_body input[type=text]:focus {
outline: 2px solid blue;
background-color: #d7d7d7 ;
}
However I cannot get this code to work for other input types, mainly a text area field and drop downs - Is there a way of doing this?
Many Thanks
chrishajer
(Chris (Gravity Forms))
June 27, 2022, 9:28pm
2
Can you share a link to the page on your site where we can see the form? Thank you.
Hi Chris, no problem, here is the link - TESTING PAGE - Fox Moving . You will see that the “Moving From Postcode” text field works in the manner I want, just wondering if the others can act in the same way. Many Thanks, Alan
chrishajer
(Chris (Gravity Forms))
June 29, 2022, 4:01am
4
Hi Alan. I added this CSS and was able to affect the outline and background color on the select fields and the textarea:
body #gform_wrapper_36 textarea:focus {
outline: 2px solid blue;
background-color: #d7d7d7!important;
}
body #gform_wrapper_36 select:focus {
outline: 2px solid blue;
background-color: #d7d7d7!important;
}
Hi Chris,
That is perfect, exactly what I needed!
Many Thanks , much appreciated.
Alan
1 Like