0

Current:

<input type="hidden" name="subject" value="| Website Owners Co. - Web Referral |" />

In a Perfect World, The following is Basically what I want it to do.

<input type="hidden" name="subject" value="| UserInput "Location" , UserInput "Date Set" |" />

IN the form itself, I would like to call upon the "Location" that the user has set, AND the "Event Date" that the user has set.

So you really get the Idea, the Form asks for the . . .

Event Date (Drop Down Values) m/d/y
Event Location (Text Field)

Can the [Subject] Line of the email be non-static in this way?

Can this be done simply? Im not that great with code beyond css/html.

Varazi
  • 583
  • 2
  • 10
  • 27

1 Answers1

0

You don't state what language for server side scripting you are using to process your form and it isn't tagged. If using PHP would suggest the following.

So, you want to submit a form, do some processing and then send an email using fields submitted in the form as the subject title?

In your form processing page just use something like the following using you are using method=POST and the field names are event_location and event_date. If you are creating the subject from the two submitted values you really do not need to submit subject as a hidden form field.

After the form is submitted you should be able to grab the contents of the two fields and then concatenate them together to create a new email subject variable.

$email_subject = $_POST['event_location']. ", ". $_POST['event_date']; 

In PHP it would be done this way. I guess it depends on how you are processing your form.

donlaur
  • 1,269
  • 1
  • 12
  • 21