Elementor: Disabling a Form Field

Let’s say you have a form field where you have dynamic data being brought in and you don’t want users to edit that data. You could always make that a hidden field within the Elementor Form widget. However, if you want it to be shown to the user, you can add some JavaScript code to disable that form field. Below is the code for disabling a form field in Elementor:


<script>
document.getElementById("FIELD_ID").disabled = true;
</script>

Please note, that you will have to copy over the field ID into the JS code from your Elementor Form. Also, put “form-field-” before the actual ID. For example, if the ID of your field was “product-item“, then you would put “form-field-product-item” for the FIELD_ID in the JS code.

Other Helpful Articles

Online Generator for Writing Terms & Conditions

Many websites need a terms and conditions page. A “Terms & Conditions” page usually refers to guidelines that website users should follow while using the site. Creating your own terms and conditions from scratch can get tricky and become time consuming. To make things easier, there are some generators online

Read More »

What Do You Need Done?:

(Please check all that apply)

Tell Us About You

Almost Done!

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info