Results 1 to 2 of 2

Thread: Need small coding help

  1. #1
    Thread Starter
    Veteran sssdornier's Avatar
    Join Date
    Nov 2012
    Location
    India
    Posts
    473
    Thanks
    10
    Thanked 12 Times in 11 Posts

    Need small coding help

    I need to restrict character input to 10 characters as number input. I am attaching the code. Can someone tell me what addition I need to make and where so as to limit the input to ten characters. I am attaching the screenshot also for the mobile number field. code-

    // display the custom fields
    function at_custom_fields() {
    ?>
    <fieldset class="at_fieldset">
    <legend><?php _e('Please enter 10 digit mobile number (required)', 'appthemes'); ?></legend>
    <p>
    <input class="text" type="text" name="at_name" id="at_name" value=<?php if (isset($_POST['at_name'])) echo esc_attr($_POST['at_name']); ?>>
    </p>
    <p>
    <input type="checkbox" name="at_age" id="at_age" value="yes" <?php echo checked( ! empty( $_POST['at_age'] ) )?> />
    <label for="age"><?php _e('I agree I\'m above 18 years and I agree to the terms and conditions of this website ', 'appthemes'); ?></label>
    </p>
    </fieldset>
    <br/>

    <style type="text/css">
    .at_fieldset { border: 2px solid #ccc; padding: 10px; border-radius: 5px; }
    .at_referral_note { font-size: 14px; color: #ccc; }
    .at_number { width: 100px }
    </style>
    <?php
    }

    mobile field.jpg

  2. #2
    Expired Customer cajsoft's Avatar
    Join Date
    Jul 2017
    Location
    UK
    Posts
    58
    Thanks
    2
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] If else PHP coding
    By patrickcrielaard in forum ClassiPress General Discussion
    Replies: 3
    Last Post: May 7th, 2013, 06:23 AM
  2. Dimitris Css coding in cp3.2 - Should this be like this?
    By bleem in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: December 12th, 2012, 01:04 PM
  3. Dimitris Css coding in cp3.2 - Should this be like this?
    By bleem in forum ClassiPress General Discussion
    Replies: 3
    Last Post: December 12th, 2012, 01:04 PM
  4. Need some coding help, please.
    By dmyers in forum ClassiPress General Discussion
    Replies: 3
    Last Post: October 17th, 2010, 02:31 AM
  5. CAn anyone help with PHP coding?
    By dollarpermile.com in forum Help Using ClassiPress
    Replies: 0
    Last Post: December 31st, 1969, 07:00 PM