Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Nithin John

    (@nithi22)

    Hi,

    This feature is only supported in WP Job Openings PRO.

    Regards
    Nithin John

    Thread Starter bdeirhiba990

    (@bdeirhiba990)

    Can I at least prevent inputs except numbers?

    Plugin Contributor Nithin John

    (@nithi22)

    Hi,

    We use the default tel input for the phone number field. Currently, it is set to the default behavior of tel input which allows international input. If you want only numbers for phone numbers, then you can apply the rule to these fields with below code.

    add_filter('awsm_application_dynamic_form_tel_field_content', 'awsm_jobs_tel_field_content', 10, 2 );
    
    function awsm_jobs_tel_field_content( $field_content, $field_args ) {
    	$field_content = str_replace('<input', '<input data-rule-digits="true"', $field_content );
    	return $field_content;
    }


    External Resources:
    How to Easily Add Custom Code to Your WordPress Websites

    Regards
    Nithin John

    Thread Starter bdeirhiba990

    (@bdeirhiba990)

    great thank you

    How can I get only 10 digit validation?

    Plugin Contributor Nithin John

    (@nithi22)

    Hi waseemsoa,

    For your requirement, in the input field you can pass minlength and mixlength attributes.

    Regards,
    Nithin John

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Phone number input’ is closed to new replies.