• Hi,

    I have different pages with a link to one CF7-form and I want automatically fill the subject field of the form with the page-title of the page from where I linked it.

    For example: I have 3 different pages with these URLs: https://www.mysite.de/page1; https://www.mysite.de/page2; https://www.mymysite.de/page3. Also the titles of these pages are:
    “page1”; “page2”; “page3”. From there I have a link to the cf7-form.

    I′m looking for a possibility, how to fill the subject-field of the cf7-form automatically with the title of the page, from where I linked it.

    So when I klick the link to the form from https://www.mymysite.de/page3, I want to have automatically have in my form (for example in the subject-field) “page3”

    Can somebody help me?
    Thanks
    Sascha

Viewing 3 replies - 1 through 3 (of 3 total)
  • hi @shertel

    seems you are looking for this: https://contactform7.com/special-mail-tags/

    and precisely [_post_title] that is used to get the page title where the contact form is placed.

    hope it helps!

    Thread Starter shertel

    (@shertel)

    Hi Erik,

    thanks for the quick reply, but it′s not working or I do something wrong.
    I included this “special mail tag” in my form like this:

    <label>title:[_post_title]</label>

    (then the rest of the form, for example …)
    <label>[text your-companytown placeholder"Your Company/Town"]</label>

    But then, when I link this page with the included form, I don′t see the title of the page from where I come, there is only:

    title:[_post_title]
    .. and then comes the form …

    The thing is, I want the person, that fills up the form, to see that the subject is the page from where he/she comes before he/she fills the rest of the form.

    I checked the web and google, but it seems there′s no easy way to get the title of the page from were I link the “Form-Button” in the subject of the form.

    Or I did something wrong and maybe you could tell me.

    However, thank you!
    Sascha

    hi @shertel

    special mail tags works only in the “mail” template (2nd tab), so if you need to get the page as mail subject you need to remove the subject from the mail template and fill the subject with something like “mail from page [_post_title]”

    if you a tag that works in the frontend you need to create custom mail tag but I guess you don’t need something that complicated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Title from the linked page in the subject field of CF7’ is closed to new replies.