Hi @plykite
It’s not possible out of the box but can be done with a bit of custom code. You can add this code to the site as “MU Plugin”:
– create an empty file with .php extension (e.g. forminator-limit-zip-code.php)
– copy and paste this code into it
<?php
/**
* Plugin Name: [Forminator Pro] WPMU DEV Customization.
* Description: Limits Forminator Text field under max length 5
* Author: @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
*/
add_action('wp_footer', 'custom_length_snippet');
function custom_length_snippet() {?>
<script>
document.querySelector('#forminator-field-text-2').setAttribute("maxlength", 5)
</script>
<?php}
Mote: In this line you’ll have to adjust the field ID
document.querySelector('#forminator-field-text-2').setAttribute("maxlength", 5)
– save the file and upload it to the “/wp-content/mu-plugins” folder of your WordPress installation; if there’s no “mu-plugins” folder right inside “wp-content” yet, just create an empty one first.
It should work out of the box if field ID matches the field on the form, though you may need to clear cache on your site/server first.
Best regards,
Adam