• Resolved thankssforhelp

    (@thankssforhelp)


    Hi there,

    I hope you are doing well and can help me with the following issue:

    I am trying to disable a form field so it cannot be edited manually – so i tried this code as mu-plugin:

    <?php
    
    add_action( 'wp_footer', function(){ ?>
    	<script>
    	(function($){
    		$(function(){
    			$(document).on("after.load.forminator", function(e, id){
    			    jQuery('#forminator-module-2284 #forminator-field-text-9').prop("disabled", true );
    jQuery('#forminator-module-2284 #forminator-field-text-10').prop("disabled", true );
    										 });
         });
    	})(window.jQuery);
    		 </script>
    	 <?php }, 21); ?>

    I got this code from here: https://ww.wp.xz.cn/support/topic/disabled-fields-2/

    I deleted:

    jQuery('#forminator-module-2284 #forminator-field-text-9').prop("disabled", true );

    and replaced in the 2nd jQuery ‘2284’ with my form-ID and ‘text-10’ with my field-ID, which is ‘address-3’.

    However, I couldn’t get any results yet – Am I doing something wrong?

    Thanks a lot in advance and kind regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @thankssforhelp

    I hope you are doing well today.

    Please export your form and upload it to google drive or dropbox and share a link in your next reply so that we could review this case and let you know what is main issue.

    Kind Regards,
    Kris

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @thankssforhelp ,
    
    We haven’t heard from you for several days now, so it looks like you no longer need our assistance.
    
    Feel free to re-open this ticket if needed.
    
    Kind regards
    Kasia

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disable form field’ is closed to new replies.