Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for custom subject lines in submitted form content #6

Open
warkior opened this issue Sep 2, 2011 · 1 comment
Open

Allow for custom subject lines in submitted form content #6

warkior opened this issue Sep 2, 2011 · 1 comment

Comments

@warkior
Copy link
Member

warkior commented Sep 2, 2011

No description provided.

@jrevillini
Copy link

I've added this to my local version of FormBuilder. I'd like to be allowed to commit a patch, but I'm not sure how to get that permission. Quickly:

  1. Open formbuilder/php/formbuilder_processing.inc.php
  2. Find: if(!$source_email) $source_email = get_option('admin_email');
  3. Just before that, insert:
        foreach($field_values as $key=>$value)
        {
            $form['subject'] = str_replace("~" . $key . "~", $value, $form['subject']);
        }

Now you can inject field values into the subject line by putting fieldname where you want the value to show up. This is the same method used in the autoresponse text and autoresponse subject line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants