Minimum Character Count
-
Hi! I’ve been looking and reading a way to set a specific amount of characters in a Field (e.g., I want the user to input a number that always have 10 characters).
I’ve found this code for a mu plugin. I loaded (changing the character count and field ID for my page) but there is no error when completing the field with less than the minimum.
This is the code:
<?php function min_forminator_input_length() { ?> <script type="text/javascript"> jQuery(function($) { $('#forminator-field-text-4').attr('minlength', '24'); }); $('#forminator-field-name-1').attr('minlength', '14'); }); </script> <?php } add_action( 'wp_footer', 'min_forminator_input_lenght' );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Minimum Character Count’ is closed to new replies.