subsite name during signup

Hello,
I have a mu-plugins to make new blog option checked as default, and the sub-domain name is the username in default, and read only.
Could you help me adjust the code and make the sub-domain name field editable (the same as username in default, but editable)?

<?php

add_action( 'wp_head', function() {
    ?>
    <script type="text/javascript">
    jQuery(function($){
        $('#signup_with_blog').click();

        $( '#signup_blog_url' ).attr('readonly', 'readonly');

        $('#signup_username').keyup(function() {
            var val = $(this).val();
            $('#signup_blog_url').val(val);
        });
    });
    </script>
    <?php
} );

Thanks!
YZ

  • Milan
    • WordPress Wizard

    Hello YZ,

    Hope you are well today and thanks for asking us. :slight_smile:

    Please try this one instead. :slight_smile:

    <?php
    
    add_action( 'wp_head', function() {
        ?>
        <script type="text/javascript">
        jQuery(function($){
            $('#signup_with_blog').click();
    
           //  $( '#signup_blog_url' ).attr('readonly', 'readonly');
    
            $('#signup_username').keyup(function() {
                var val = $(this).val();
                $('#signup_blog_url').val(val);
            });
        });
        </script>
        <?php
    } );

    Let me know how it goes. :slight_smile:
    Best Regards,
    Milan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.