• Resolved mimmo99

    (@mimmo99)


    Hi,
    I need to validate some fields and I found your “wppb_check_form_field_input” filter but the “wppbc_custom_input_validation” function is not called.

    I inserted this code in functions.php and after various tests I simply understood that it is not called.

    In my functions.php

    /* handle field validation */
    add_filter( 'wppb_check_form_field_input', 'wppbc_custom_input_validation', 20, 4 );
    function wppbc_custom_input_validation( $message, $field, $request_data, $form_location ){
    echo "<script>console.log('TEST' );</script>";
    return $message;
    }

    What’s the problem?
    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Cristian Antohe

    (@sareiodata)

    Hi,

    Whatever is returned is what’s being outputted. You need to do something like:

    return $message . $js_script;

    However, the main reason why it’s not being called is because that filter is not found in the Free version.

    Instead it’s found inside wp-content/plugins/profile-builder-pro/front-end/extra-fields/input/input.php

    If you open other fields like last-name.php you’ll notice the filter is actually different:

    add_filter( ‘wppb_check_form_field_default-last-name’, ‘wppb_check_last_name_value’, 10, 4 );

    Thread Starter mimmo99

    (@mimmo99)

    Thanks a lot for the answer. But then, in the free version, can’t I validate a custom input field? ??

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Input Validation’ is closed to new replies.