Pre fill field example
-
Hi, thank for your plugin.
You said it is possible prefill fields with jquery.
I try this solution in functions but don’t work:
add_action( ‘wp_body_open’, ‘metform_add_userid’ );
function metform_add_userid() {
echo ‘<script>
var selector = “.mf-form-wrapper”;
jQuery(selector).on(“metform/after_form_load”, function(e, data){
data[ “form-userid” ] = “‘.get_current_user_id().'”;
return data;
});
</script>’;Can you write a working example? and how to insert it?
Thank in advance for your time.
Regards,
Enrico – Italia
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Pre fill field example’ is closed to new replies.