Title: SCRIPT NOT WORKING AFTER UPDATE
Last modified: September 19, 2022

---

# SCRIPT NOT WORKING AFTER UPDATE

 *  Resolved [davidf112](https://wordpress.org/support/users/davidf112/)
 * (@davidf112)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/script-not-working-after-update/)
 * I had this script you posted on another Support Post that forced UPPERCASE on
   a field.
 * After your recent update, the form fields unique ID, prevented this script from
   working.
 * I’m asking you for an updated version of the script!
 * Thank you!
 * PREVIOUS SCRIPT:
 *     ```
       <?php
   
       add_action('wp_footer', function() {
       ?>
       <script type="text/javascript">
       jQuery(document).ready(function($) {
       $('#forminator-module-38861 #forminator-field-text-1').on('keyup', function() {
        $(this).val($(this).val().toUpperCase());
       });
       });
       </script>
       <?php
       });
       ```
   
    -  This topic was modified 3 years, 9 months ago by [davidf112](https://wordpress.org/support/users/davidf112/).

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

 *  [Aakash](https://wordpress.org/support/users/aakash8/)
 * (@aakash8)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/script-not-working-after-update/#post-16024731)
 * Hi [@davidf112](https://wordpress.org/support/users/davidf112/)
 * This should do the trick:
 *     ```
       <?php
   
       add_action('wp_footer', function () {
       ?>
           <script type="text/javascript">
               jQuery(document).ready(function($) {
                   var uid = $('#forminator-module-38861').attr('data-uid');
                   $('#forminator-field-text-1' + uid).on('keyup', function() {
                       $(this).val($(this).val().toUpperCase());
                   });
               });
           </script>
       <?php
       });
       ```
   
 * The new update creates a unique ID linked to each form that’s appended to each
   field within it, so any fields targeted by ID will need to be updated. You can
   find out more about this update in [this thread](https://wordpress.org/support/topic/asking-for-clarification-about-changelog-improvement/).
 * Hope this helped!
 *  [Kris – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport13/)
 * (@wpmudevsupport13)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/script-not-working-after-update/#post-16024842)
 * Hi [@davidf112](https://wordpress.org/support/users/davidf112/)
 * As mentioned in this post:
    [https://wordpress.org/support/topic/asking-for-clarification-about-changelog-improvement/](https://wordpress.org/support/topic/asking-for-clarification-about-changelog-improvement/)_“
   Improvement: Form fields now have a unique ID. This unique ID is also added as
   data-uid attribute to the form tag, so If you currently have scripts that use
   field ID’s, these will need to be updated now.”_ with last update we add unique
   ID.
 * From what I checked [@aakash8](https://wordpress.org/support/users/aakash8/) 
   above solution should help.
 * Kind Regards,
    Kris
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/script-not-working-after-update/#post-16040811)
 * Hello [@davidf112](https://wordpress.org/support/users/davidf112/) ,
 * We haven’t heard from you for a while now, so it looks like you don’t need our
   assistance anymore.
 * Feel free to re-open this ticket if needed.
 * Kind regards
    Kasia
 *  Thread Starter [davidf112](https://wordpress.org/support/users/davidf112/)
 * (@davidf112)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/script-not-working-after-update/#post-16042790)
 * Hello, sorry to re-open it, but the script is not working. I checked with multiple
   forms, and it’s totally not working.
 * Thank you
 *  [Aakash](https://wordpress.org/support/users/aakash8/)
 * (@aakash8)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/script-not-working-after-update/#post-16042875)
 * Hi [@davidf112](https://wordpress.org/support/users/davidf112/)
 * My apologies, I had copy/pasted the code I suggested earlier from another source,
   and realized that it’s missing an underscore.
 * Try this instead:
 *     ```
       <?php
   
       add_action('wp_footer', function () {
       ?>
           <script type="text/javascript">
               jQuery(document).ready(function($) {
                   var uid = $('#forminator-module-38861').attr('data-uid');
                   $('#forminator-field-text-1_' + uid).on('keyup', function() {
                       $(this).val($(this).val().toUpperCase());
                   });
               });
           </script>
       <?php
       });
       ```
   
 * If you still need a hand, please link the page with the form and I can assist
   further.
 * Hope this helped!
 *  Thread Starter [davidf112](https://wordpress.org/support/users/davidf112/)
 * (@davidf112)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/script-not-working-after-update/#post-16042910)
 * It works great! Thank you, SOLVED!

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

The topic ‘SCRIPT NOT WORKING AFTER UPDATE’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [davidf112](https://wordpress.org/support/users/davidf112/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/script-not-working-after-update/#post-16042910)
 * Status: resolved