Set field to Read only adds onfocus ( delete_value)
Paul Day created the topic: Set field to Read only adds onfocus ( delete_value)
I have a field on a form that I use for a calculated value. I have set it through Form Maker to be read only, but when a user clicks on the field it clears the value. This is because on the onfocus event which calls delete_value(this). Why is this done and can it be stopped through form maker ( I can stop it myself in Javascript, but would be better to understand why and how to stop correctly through Form Maker )
Regards
Paul
Please Log in or Create an account to join the conversation.
6 years 2 months ago
Agapi G. replied the topic: Set field to Read only adds onfocus ( delete_value)
Hello Paul!
Thank you for posting your request!
Please note, that we use this to perform style actions on forms. But if you'd like to remove the clearing out effect from a field, please add the following jQuery code to Form Options > Javascript tab. You can write it in jQuery(document).ready(), outside of all built-in functions.
jQuery("#element_ID").removeClass("input_deactive").addClass("input_active");
Make sure to indicate the ID of your field instead of #element_ID. Let us know if this works.
Thank you! Have a wonderful day!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
6 years 2 months ago