Home>

I created an input form in the front end with WP User Frontend Pro.
Log in user information to the text item of this form when the form is opened
I want to display it as the default value.
It seems that the default fixed value can be set on the form creation screen.

Corresponding source code

wpuf_add_post_form_top
Is it a form of hooking and executing with?

What I tried

For example, in the title, such a sample
function my_default_title ($post_title, $post) {
if ($post->post_type =='post') {
$post_title ='default title';
}
return $post_title;
}
add_filter ('default_title','my_default_title', 10, 2);
It is said that it can be set with, but with the WP User Frontend Pro form
It didn't work.

  • Answer # 1

    wpuf_add_post_form_top
    I didn't know how to deal with it, so directly
    I decided to fix the source.
    class-field-manager.php
    of
    render_fields
    in class
    $field
    Changing the default values ​​in the array gave the desired behavior.
    If possible, I don't want to touch the sauce directly
    Please let me know if there is another good way.

Related articles