Title: Driving License Pattern Input Format
Last modified: November 8, 2021

---

# Driving License Pattern Input Format

 *  Resolved [alitheabdullah](https://wordpress.org/support/users/alitheabdullah/)
 * (@alitheabdullah)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/driving-license-pattern-input-format/)
 * Hi,
    I am creating a registration form for driving school and I want user to 
   enter their driving license number in its format i.e. “A1111-22222-33333” the
   license can contain both numbers & alphabets so it not only just number field.
 * So when the user types first 5 character there will be an automatic “-” in the
   input so that the format stays the same and also limit user to write more then
   15 characters.
 * Any help will be appreciated
    Thanks

Viewing 1 replies (of 1 total)

 *  Thread Starter [alitheabdullah](https://wordpress.org/support/users/alitheabdullah/)
 * (@alitheabdullah)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/driving-license-pattern-input-format/#post-15048278)
 * [https://wordpress.org/plugins/masks-form-fields/](https://wordpress.org/plugins/masks-form-fields/)
   
   Created a custom mask using this plugin
 *     ```
       /**
        * WordPress Plugin: Masks Form Fields - https://wordpress.org/plugins/masks-form-fields/
        * Function to add custom mask. /wp-content/themes/YOUR-THEME/functions.php
        * Documentation, Demos & Usage Examples - jQuery Mask Plugin v1.14.0 - https://igorescobar.github.io/jQuery-Mask-Plugin/docs.html
        */
       function custom_masks_form_fields() {
           ?>
           <script type="text/javascript">
               jQuery(document).ready(function($){
                   $("input[name='input_name']").mask('(000) 000-0000');
                   // $("input.class_name").mask('custom-mask');
               });
           </script>
           <?php
       }
   
       add_action('wp_footer', 'custom_masks_form_fields', 111);
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Driving License Pattern Input Format’ is closed to new replies.

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

 * 1 reply
 * 1 participant
 * Last reply from: [alitheabdullah](https://wordpress.org/support/users/alitheabdullah/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/driving-license-pattern-input-format/#post-15048278)
 * Status: resolved