Hello Zafer,
Thank you very much for your kind and quick reply. Your help works very well but may I ask some more questions please –
- How can I include that html field in your plugin’s submission tab of wordpress dashboard? Now I can’t know what the users fill in that field when they submit the form.
- Is it possible to customize error message for that html field when a user fills invalid inputs. I tried using ‘oninvalid’ attribute but I think it doesn’t work. My code is as follow.
<?php
add_shortcode('html_text', 'wpmudev_html_text');
function wpmudev_html_text() {
return "<input type='text' maxlength='12' minlength='12' onkeypress='return event.charCode >= 48 && event.charCode <= 57' style='width:100%' oninvalid='this.setCustomValidity('Wrong ID Number')' onchange='this.setCustomValidity('')' onvalid='this.setCustomValidity('')' required='true'>";
}
add_filter( 'forminator_replace_variables', 'do_shortcode' );
With thanks,
flyingphyo
-
This reply was modified 12 months ago by flyingphyo.