Title: Custom Javascript callback JS
Last modified: January 17, 2020

---

# Custom Javascript callback JS

 *  Resolved [tabular](https://wordpress.org/support/users/tabular/)
 * (@tabular)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/custom-javascript-callback-js/)
 * Hi there,
 * first of all thank you for the plugin. Helped a lot.
    I still have a major question.
   In the Plugin exists a field for “Custom Javascript” which gets invoked with 
   the rendering of the plugin.
 * Does there exist a way to run this custom javascript AFTER the JS of the Plugin
   itself is run?
 * I need to manipulate some of the attributes of the fields in the form. Therefore
   I need my JS to run after the form is rendered by the Plugin.
 * Best Regards
    -  This topic was modified 6 years, 4 months ago by [tabular](https://wordpress.org/support/users/tabular/).
      Reason: added Tags

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/custom-javascript-callback-js/#post-12337812)
 * Hi,
 * We have just published a plugin update (version 1.3.03) that improves that customization
   option.
 * Now the script is loaded after jQuery and the main form script and there is also
   a new event support to know when the form has been rendered and is ready to be
   used.
 * The event is the following:
 *     ```
       jQuery(document).one('showHideDepEvent', function(){
           (function($) {
              // place your code here
           })(jQuery); 
       });
       ```
   
 * So, if you need – for example – change the value of a field you can use a code
   like this one:
 *     ```
       jQuery(document).one('showHideDepEvent', function(){
           (function($) {
               $("#fieldname1_1").val("hello world");
           })(jQuery); 
       });
       ```
   
 * Hope that helps.
 * Thank you for using the plugin!
    -  This reply was modified 6 years, 4 months ago by [codepeople](https://wordpress.org/support/users/codepeople/).
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/custom-javascript-callback-js/#post-12337815)
 * I forgot to add, remember to clear the browser cache after updating the script,
   in most cases the browser and/or WordPress cache plugins will keep a cached copy
   of it.
 * Thank you!
 *  Thread Starter [tabular](https://wordpress.org/support/users/tabular/)
 * (@tabular)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/custom-javascript-callback-js/#post-12344743)
 * Thank you very much. I will test the solution today and will reply.
 *  Thread Starter [tabular](https://wordpress.org/support/users/tabular/)
 * (@tabular)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/custom-javascript-callback-js/#post-12344843)
 * Thank you very much. I just tested your solution and it works like a charm.
 * good job!

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

The topic ‘Custom Javascript callback JS’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-to-email/assets/icon-256x256.png?rev=1907808)
 * [Contact Form Email](https://wordpress.org/plugins/contact-form-to-email/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-to-email/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-to-email/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-to-email/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-to-email/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-to-email/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [tabular](https://wordpress.org/support/users/tabular/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/custom-javascript-callback-js/#post-12344843)
 * Status: resolved