# Need help with HTML FORM email



## Bot (Mar 11, 2014)

so, what i am trying to do is send an email from an HTML FORM. i want to keep it somewhat simple, meaning i don't want employ JS or PHP. HTML and CSS only.

what i have so far:

```
<form name="DriveOnRequest" method="POST" action="mailto:myemail@example.com?subject=Drive On Request" type="text/html" content-type="Multipart/formdata" accept-charset="UTF-8" enctype="Multipart/formdata" >

    <table>
        <td>
            <tr>
                <th><label>Requestor Name:<abbr title="Enter your name if you are the requestor or the name of the person who you are requesting the drive on for.">Help</abbr></label></th>
                <td><label>First</label><input type="text" name="first1" min="2" required></td>
                <td><label>Last</label><input type="text" name="last1" min="2" required></td>
            </tr>
```

this is the more important part .. i think as i believe that the problem is somewhere in here.
i am closing the form out and have a submit button. everything works fine up until then.
when i submit it opens the default email program and is ready to send; however, the email inside looks something like this:


> first1=Test&last1=Test



Questions:
1. How can i remove the INPUT NAME Tags (first1=) or at least the "=" sign?
2. How can i remove the "&" sign obviously used as space.
3. Is there a way to style the whole thing at all? Because this is really where i need it. In the email, not the form. 

I am thinking that it has to do with the charset or the encoding but i am not sure. I find everything on the www about how to style the form but no more than bits and pieces about the resulting email.


----------



## Easy Rhino (Mar 14, 2014)

Did you figure this out because I don't understand what you are doing? You see first1=Test&last1=Test because you are passing those values to the email program. However the email client does not know what to do with them. Your form method is POST but an email client cannot accept POST at least as far as I know. This is why you pass those values to PHP or Javascript and then have THAT process the values and send an email using the internal mail server...


----------



## SKL_H (Mar 14, 2014)

You are going to need JS and PHP cause HTML and CSS cannot process an email alone.


----------



## Easy Rhino (Mar 14, 2014)

SKL_H said:


> You are going to need JS and PHP cause HTML and CSS cannot process an email alone.



That's what I said.


----------



## Bot (Mar 18, 2014)

yes thanks @rhino. i thought HTML and CSS could do it or figure it should be able to do it. it's not, at least not in the way i imagined and wanted it. 
i created a form which looked nice with INPUT fields and requirements and so forth and basically wanted the resulting email to look similar or the same but instead have the INPUT fields show in the email just show the information that was submitted. basically in the INPUT name field the actual name would show that was submitted.
doesn't work that way. i could have done without all the styling but the result still showed the name tag of the input string, which made the email very hard to read and confusing.

so PHP would be the best option. However, in my rare case, this was not supposed to be part of a website. this was supposed to be more of an outlook template replacement. we have a small group of people here (10-12) that sends us visitor requests for people to come to our work site that are not employees. everytime they send us these requests the email looks different and they do crazy stuff with the information we need to get out of those emails. we tried talking to them but it's no use so i decided to make a template. initially in outlook which worked well but not everybody has or uses outlook. so i needed another way to get them to use a form of some sort which led me to HTML. thought i just create a single html file, no website and let them use it to submit their requests. so obviously since this is going to be running on their personal whatever machine i won't have any influence on what OS or other programs are installed nor can i require them to install them which is exactly why i choose HTML. it would run on any machine, regardless of the environment and programs installed.

didn't work out so i am still in a pickle to figure this out


----------



## Easy Rhino (Mar 18, 2014)

Bot said:


> yes thanks @rhino. i thought HTML and CSS could do it or figure it should be able to do it. it's not, at least not in the way i imagined and wanted it.
> i created a form which looked nice with INPUT fields and requirements and so forth and basically wanted the resulting email to look similar or the same but instead have the INPUT fields show in the email just show the information that was submitted. basically in the INPUT name field the actual name would show that was submitted.
> doesn't work that way. i could have done without all the styling but the result still showed the name tag of the input string, which made the email very hard to read and confusing.
> 
> ...



Write a basic PHP form page on your server and tell them to use it. They fill out the form, click submit, and it sends the person managing the process an email with the information. You can also setup a very simple backend to store the data.


----------



## Bot (Mar 18, 2014)

yea, i was thinking more along the lines of a php file along with the html file but i think that won't work either. corp IT is kind of finicky about installing php on the server here. i explained that it is not rocket science but they believe it is evil =D


----------

