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

Smart Web Creative - Quick Resources: Date and Time in PHP

Quick Resources: Date and Time in PHP

If you want to display the date and time in PHP, it can be somewhat confusing what letters to use to bring in those elements. Below is a list of all the PHP date and time options that you can use on your site: To utilize these options in PHP,

Read More »

Creating A Blog Post in WordPress

Creating a blog post in WordPress is a great way to add fresh content to your site. However, make sure that your site was built with a blog feature. Here are steps on how to create a new blog post in WordPress: Log into your WordPress site Go to yoursite.com/admin

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