custom-contact-forms
custom-contact-forms copied to clipboard
Please add also fields to Subject
Please make fields also available in notification subjects aka Subject: New message by [Name] Tnx
I would love to see this :)
Anyone knows a quick fix to include post-url in subject?
Thanks
@yelch Until this is added as functionality, you can always customize a notification subject by hooking to the ccf_email_subject
filter. User-submitted form data is accessible in the $submission
array, with the internal unique slug serving as the field's key.
If, for example, the slug for your "name" field was user_name
, the function would look like this:
function custom_email_subject( $subject, $form_id, $email, $form_page, $notification, $submission ) {
return "New Message by " . $submission['user_name'];
}
add_filter( 'ccf_email_subject', 'custom_email_subject', 10, 6 );