• Resolved vermaakpetrus

    (@vermaakpetrus)


    Hi there,

    How do I limit the characters that can be used to the first name & last name fields?

    We need to specify no more than 15 characters each.

    • This topic was modified 3 years, 6 months ago by vermaakpetrus.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor genetech

    (@genetech)

    Hi,

    • Go to your “plugins” directory.
    • Locate and copy this template file “pie-register/pie_register_template/registration/registration_form_template.php”
    • Go to your current theme’s directory. Paste it in same folder order. e.g. “your-theme-directory/pie-register/pie_register_template/registration/registration_form_template.php”
    • Now edit the template file “registration_form_template.php”. Find function addName() and find and replace below changes.
    
    On line no. 370:
    $data .= '<input '.$this->read_only.' value="'.$this->getDefaultValue('first_name').'" placeholder="'.$placeholder.'" data-field_id="'.$this->get_pr_widget_prefix().'piereg_field_'.$this->no.'" id="'.$this->id.'_firstname" name="first_name" class="'.$this->addClass('input_fields',['maxSize[15]']).' piereg_name_input_field '.$cl_class.'"'.$cl_data.' '.$this->addValidation().'  type="text"  />';
    
    On line no. 379:
    $data .= '<input '.$this->read_only.' value="'.$this->getDefaultValue('last_name').'" placeholder="'.$placeholder2.'" id="'.$this->id.'_lastname" name="last_name" class="'.$this->addClass('input_fields',['maxSize[15]']).' piereg_name_input_field" '.$this->addValidation().'  type="text"  />';
    

    Thanks

    • This reply was modified 3 years, 6 months ago by genetech.
    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    Hi there,

    Followed the instructions exactly, but it still allows a first and last name longer than 15 characters.

    Plugin Contributor genetech

    (@genetech)

    Please share your registration page url. You can also contact us here.

    Thanks

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    I have sent you login credentials so that you can check.

    Plugin Contributor genetech

    (@genetech)

    Hi,

    Changes weren’t applied properly, added class for maximum character limit didn’t add. See screenshot: https://prnt.sc/uprg0b

    We have made change and replied on your contact form query. Please check now.

    Thanks

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    Thank you! Can confirm it’s working!

    Plugin Contributor genetech

    (@genetech)

    Hi,

    Can you please write the review here about our product: https://wordpress.org/support/plugin/pie-register/reviews/.

    This will keep our team motivated.

    Thanks

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Limit character in form’ is closed to new replies.