• Resolved fjpmaia

    (@fjpmaia)


    I’m using the script below to convert some registration fields to uppercase, including shipping and billing first_name and last_name. But with Fluid Checkout plugin it doesn’t work. Without the plugin it works normally. How to make it work in Fluid Checkout?

    The billing_email field is working (lowercase). Why?

    <script type="text/javascript">
        jQuery(document).ready(function($) {
            jQuery('#account_first_name, #account_last_name, #shipping_first_name, #shipping_last_name, #shipping_company, #billing_first_name, #billing_last_name, #billing_company, #form-field-first_name, #form-field-last_name').keyup(function() {
                $(this).val(function(i, val) {
                    return val.toUpperCase();
                });
            });
        });
    	
        jQuery(document).ready(function($) {
            jQuery('#account_email, #billing_email, #form-field-email').keyup(function() {
    	    $(this).val(function(i, val) {
                    return val.toLowerCase();
                });
            });
        });
    </script>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @fjpmaia,

    There are some modifications that need to be done in custom scripts for them to be used correctly.

    We are in the process of creating an article that will explain it thoroughly how to modify it.

    We will post it here once it is completed.

    Best,
    Alan.

    Thread Starter fjpmaia

    (@fjpmaia)

    Hi Alan,

    I’m waiting for the article.

    Thanks for the answer.
    Fernando Maia

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @fjpmaia,

    You can find the documentation article on how to fix custom scripts to work with Fluid Checkout here:
    https://fluidcheckout.com/docs/troubleshoot-js-events/

    We used your custom code for the examples in the documentation, so you will probably be able to just copy the solution.

    Please note that our support scope does not cover custom coded solutions.

    I’m closing this ticket for now.

    Best,
    Diego.

    Thread Starter fjpmaia

    (@fjpmaia)

    Hi Diego,

    Thanks for the article, it worked perfectly. I just had to make a correction for lower case in the code part below.

        var changeToLowercase = function( field ) {
            field.value = field.value.toLowerCase();
        }

    It was showing the following error:
    (index):1224 Uncaught ReferenceError: field is not defined at changeToLowercase ((index):1224:4)
    at HTMLBodyElement.handleKeyUp ((index):1234:5)

    You have excellent support!

    Thanks!

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @fjpmaia,

    Awesome!

    Thanks for the feedback and for letting me know about the error in the proposed solution. This has now been fixed on our documentation.

    Best,
    Diego.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘JQuery event doesn’t work on address fields’ is closed to new replies.