• Resolved hmdnawazz

    (@hmdnawazz)


    I have created a form using visual form builder plugin. I want to set a default value for a field from url.

    I wrote the following code for this.

    add_filter( 'vfb_field_default', 'cs_vfb_filter_field_default', 10, 4 );
    function cs_vfb_filter_field_default($default, $field_type, $field_id, $form_id) {
     if($field_id == 42 && $form_id == 3) {
                    return $default = 'some text';
            }
    
    }

    But it is not working? Any one who have some idea about this?

    https://wordpress.org/plugins/visual-form-builder/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Visual form builder: how to add a default value?’ is closed to new replies.