• Resolved ARCangelGIRL

    (@arcangelgirl)


    Hello,

    I would like to change email subject in the email when it’s send when somebody submits the form. In plugin folder “includes” I found file email.php that has comment “Allow the form settings to be filtered (ex: return $form_settings->’form_title’ = ‘Hello World’;)”, so I tried to write some code (I’m not very familiar with php) and a hook new email subject.

    Below is my code which is not working. I suppose that I missed something. Does anybody could help me with this?

    function custom_email_subject ( $form_settings, $form_id ) {
    	global $post;
    	$new_custom_subject = $post->post_name;
    
    	return $form_settings-> form_title = $new_custom_subject;
    }
    add_filter ('vfb_email_form_settings', 'custom_email_subject', 3, 2);

    https://ww.wp.xz.cn/plugins/visual-form-builder/

Viewing 1 replies (of 1 total)
  • Are you trying to dynamically change the email subject? You can use template options in our Pro version in order to do some of that.

    Thanks!
    Joseph
    VFBPro Support

Viewing 1 replies (of 1 total)

The topic ‘Change email subject’ is closed to new replies.