WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Contact Form 7] Adding dynamic subject in contact form 7 (10 posts)

  1. Screaminchief
    Member
    Posted 4 years ago #

    Hi everyone

    I have a site that lets people book track days. I have about 50 track day events and therefor about 50 forms on the site. They are all idnetical apart from the subject which will tell me which event they're booking when I get the email.

    At the moment I'm going through and adding a new form for each event but is it possible to just use 1 form for all of them and have a dynamic subject field like %postname% that will automatically fill in the subject field based on the post name?

    Many thanks for your help! any help will be much appreciated!

  2. mixomix
    Member
    Posted 4 years ago #

    I secnond that question.
    That would be really helpfull. I am in exactly the same situation.

    Any help will be appreciated!

  3. NilsAllwardt
    Member
    Posted 4 years ago #

    Ich habe die gleiche Frage.

    Von einer Artikelseite soll es mit einem Button/Link zur Kontaktformularseite gehen. In dem Kontaktformular soll dann das Betreff-Feld den Titel des Artikels enthalten, auf dem der User zuvor war.

    Alternativ könnte das Formular auch direkt unter jedem Artikel eingebaut werden (und wieder ein vorausgefülltes Betreff-Feld mit dem Titel des Artikels haben).

    Grüße Nils

    -------

    I have the same problem. Anybody has a solution?

  4. kove
    Member
    Posted 4 years ago #

    I have exactly the same request: some way to insert a dynamic subject field, possibly taken from the post title/page title.

    I'm in the same situation of user Screaminchief.

  5. volvicpfirsich
    Member
    Posted 4 years ago #

    We have the same problem, can anybody help us?

  6. pilopaz
    Member
    Posted 4 years ago #

    ok, i´m another one with the same problem... i bet someone aoround there can help us... let´s hope :)

  7. Takayuki Miyoshi
    Member
    Posted 4 years ago #

    Wait for the next release.

  8. mast9327
    Member
    Posted 4 years ago #

    i am also want the same functionality.
    mast9327@gmail.com

  9. clickgnosis
    Member
    Posted 4 years ago #

    So easy with Javascript ;-)

    // HTML
    <a href="my-link?subject=My%20subject">Click</a>
    
    // JS + PHP
    $(document).ready(function() {
    	$('input#subject').val('<?=$_GET['subject']?>');
    	$('input#subject').attr("disabled", true);
    });
  10. Takayuki Miyoshi
    Member
    Posted 4 years ago #

    In the current version, you can use [_post_name] special tag in your mail. See http://contactform7.com/2009/12/25/special-mail-tags/

Topic Closed

This topic has been closed to new replies.

About this Topic