• Resolved FeniXx

    (@fenixx)


    Good day,
    it is possible for you to add the correct type values ​​for “input” elements. E.g. for phone type = “tel” (https://www.w3schools.com/tags/att_input_type_tel.asp) you can choose the pattern and numbers type = “number” (now the type is not increase / decrease.

    Thank you for the addition.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @fenixx

    I hope you are doing well.

    You can use a custom filter to modify the Phone field:

    <?php
    
    add_filter( 'forminator_field_phone_markup', function( $html, $id ) {
    
       $html = str_replace( 'type="text"', 'type="tel" pattern="[0-9]{3}-[0-9]{2}-[0-9]{3}"', $html );
    
       return $html;
    
    }, 10, 2 );

    Add it to child theme functions.php or using mu-plugin https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    However, this won’t validate further the field, we do have plans to allow some regex validation in the field settings but we don’t have an estimated time yet.

    Best Regards
    Patrick Freitas

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @fenixx ,

    We haven’t heard from you for a while now, so it looks like you don’t have more questions for us.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add input types and options’ is closed to new replies.