Skip to main content
Inspiring
November 27, 2023
Question

Quick question about Contact Forms

  • November 27, 2023
  • 3 replies
  • 934 views

Hi everyone,

 

I have a simple contact form that includes only three input fields: name, email address, and comments. All three are required.

 

As it stands, inquires arrive with "Contact Form" as the subject, but I would like the subject to show the sender's e-mail address or name.

 

This is how the form is current set up. How can I substitute "Contact Form" with either the name or email address?

 

Thanks for any help you can provide.

 

Mark

 

<input type="hidden" name="subject" value="Contact Form">

 

<li>
<label>Complete Name <span class="required">*</span></label>
<input type="text" name="field1" class="field-divided" placeholder="First">
<input type="text" name="field2" class="field-divided" placeholder="Last">
</li>
<li>
<label>Email <span class="required">*</span></label>
<input type="email" name="field3" class="field-long">
</li>

This topic has been closed for replies.

3 replies

Community Expert
November 28, 2023

Something else to consider if you want more control over your forms, but don't want to get involved with the code, you could look into hosted solutions like Typeform ( https://www.typeform.com/ ) or something tied to a CRM to store those names into like Hubspot ( https://www.hubspot.com/ ).

Inspiring
November 30, 2023

Hi Nancy, Ben, and Osgood,

 

Thanks so much for your help.

 

Osgood, I reached out to my ISP and they provided me the necessary information. It didn't take too long to make the corrections. Thanks.

 

Nancy, you were correct. The messages are now coming from the sender's email, not the server. Thanks.

 

Nancy and Ben, the ISP referred me to this site, https://www.tectite.com/. I don't know how it compares with the scripts you've mentioned, but it seems to be working just fine. Perhaps with a more complex form, there would be advantages selecting another.

 

Thanks, and kind regards,

 

Mark


P.S. I see the EU is giving Adobe a hard time with their proposed acquisition of Figma. If the merger is denied, maybe it will spur Adobe to further develop Dreamweaver. That would be wonderful.

 

Nancy OShea
Community Expert
Community Expert
November 30, 2023
quoteP.S. I see the EU is giving Adobe a hard time with their proposed acquisition of Figma. If the merger is denied, maybe it will spur Adobe to further develop Dreamweaver. That would be wonderful.
By @Fun Seeker

========

This sounds like 'Unicorn Theory.'

 

1. Figma is located in San Francisco, 1-1/2 hours north of Adobe's headquarters in San Jose, California.  The Federal SEC decides on U.S. based business mergers & acquisitions.  I'm not sure if the EU has any say in it. 

 

2. Unlikely, don't get your hopes up.  Figma has nothing to do with Dreamweaver.  AFAIK, Figma will replace XD as Adobe's new UI/UX design app.  Dreamweaver & XD have stopped new development. 

https://www.theverge.com/2023/6/22/23769586/adobe-xd-discontinued-shutting-down-figma-design-app

 

Nancy O'Shea— Product User & Community Expert
Nancy OShea
Community Expert
Community Expert
November 27, 2023

Herein lies the problem: The PHP Mail() function is sending mail from YOUR SERVER, not from the sender's email.  So when you hit the email REPLY button, you're actually sending mail back to the server where it orginated.  Be aware of that.

 

I recommend using a secure form-to-email processing script.  PHPMailer is the one most recommended by hosting providers.  Below is a simple contact form.

https://github.com/PHPMailer/PHPMailer/blob/master/examples/simple_contact_form.phps

 

Nancy O'Shea— Product User & Community Expert
Legend
November 27, 2023
quote

Hi everyone,

 

I have a simple contact form that includes only three input fields: name, email address, and comments. All three are required.

 

As it stands, inquires arrive with "Contact Form" as the subject, but I would like the subject to show the sender's e-mail address or name.

 

 

 

That would be done in the script you are using, presumably php. Can you paste what you currently have here as it would be part of the mail() function.