Custom email subject line for contact form

  • Unknown's avatar

    Hi,

    While receiving email alerts for the contact forms, all the subject lines are the same and it’s kinda confusing to keep track off.

    Is it possible to pull the email subject line from one of the text fields from the form (example from the message title?).

    I’ve read through https://en.support.wordpress.com/forms/contact-form/ and do not see much information on there.

    Any help would be appreciated. Thanks :)

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Thanks, I kinda found a solution for it here
    https://optimwise.com/add-a-subject-field-to-a-jetpack-contact-form/

    Now, just wondering if I can merge two tags on the email Subject line… Example, now it just picks the ‘Subject’ field as the email title. Again, this is confusing because a simple, “Hi, how are you” email title looks like it’s from a different source.

    I’d like the email title to also have the name of my blog, like, “[Blog Name] Subject line here”

    Would this be possible ?

    Regards,

  • HI there,

    When setting up or editing a contact form, there’s an Email tab where you can specify both the email address(es) the form submissions should go to, as well as the subject line the email should show for that specific form. It’s explained in the support doc you linked to above:

    https://en.support.wordpress.com/forms/contact-form/#notification-preferences

    But the subject line is configured to the form, not to individual submissions of the form.

  • Unknown's avatar

    Thanks for your response :)

    But the subject line is configured to the form, not to individual submissions of the form.

    I did however get that working. By adding a “subject=” tag in the code I got customized email subject line as per the content of the subject field. Example, if the Subject field text says “Hi, how are you”, my email subject field would also say, “Hi, how are you”. However, this is so generic, it’s hard to differentiate normal emails from messages received from the blog. I wanted to know if the email subject line could be like this, “[Blog Name] Hi, How are you”.

    It’s okay if that’s not possible though. This is great enough for a free blog. I’ll be updating very soon to Buisness plan, and I’ll install a custom plugin for forms need I want more customization. Thanks anyways :)

    For the benifit of the others reading this post, I’ll post below the code that I use.
    [contact-form submit_button_text="Shoot your Email!" subject="Subject"][contact-field label="What's your Name?" type="name" required="1" /][contact-field label="...and your Email?" type="email" required="1" /][contact-field label="Subject" type="subject" required="1" default="" placeholder="A Brief of your Message" /][contact-field label="Drop me a Message" type="textarea" required="1" placeholder="Thank's for writing to me, Introduce yourself and let me know what you're looking for here..." /][/contact-form]

  • We do support a couple other forms, if that helps. You can also use Wufoo, Jotform and Google forms without requiring any plugins, and those might offer more customization options like what you’re looking for:

    Forms

  • Unknown's avatar

    Hi Hello,

    Oh thank you. I wasn’t aware of that. Will read up on that.

    Thank you once again. You’ve been more than helpful ☺️

  • The topic ‘Custom email subject line for contact form’ is closed to new replies.