Replace script attr or link

Much like all programming, there are many ways to go about solving this. One way is using an id tag id = “script_lionlaw” (or name is whatever you want) within the script. <script type=”text/javascript” src=”https://thompsonlaw.formstack.com/forms/js.php/tho_lionlaw_com_v2″ id = “script_lionlaw”></script> You could then use jquery (or some other means) to grab the tag and then replace it … Read more

How to show cities according to the state in Form using Javascript? [closed]

I got the solution for this. Just Add This Code In Contact Form 7: <select name=”stt” id=”sts” class=”form-control” required=”” onchange=”print_city(‘state’, this.selectedIndex);”></select> <select name=”city” id=”state” class=”form-control” required=””></select> <script language=”javascript”>print_state(“sts”);</script> And This In Functions.php function my_theme_scripts_function() { wp_enqueue_script( ‘myscript’, get_template_directory_uri() . ‘/cities.js’); } add_action(‘wp_enqueue_scripts’,’my_theme_scripts_function’); You Can Take The Cities.js File From Here: https://github.com/ajayrandhawa/Indian-States-Cities-Database In this, you can … Read more

Get the ID of a page in Parent combobox in editor

After some time reading the Editor Documentation I found the proper solution. This is how you can listen to changes and get the id of the Parent Combobox select in the WP Editor: wp.data.subscribe( function () { var newParent = wp.data.select(‘core/editor’).getEditedPostAttribute(‘parent’); console.log(newParent); } ); wp.data.subscribe is called every single time a change occurs in the … Read more