• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

Problem With Mailto Form

Question

MRM316    13

I have a problem with some HTML code & I was hoping someone could help me out.

I have the following form code on my website:

<form enctype="text/plain" action="mailto:myemailaddress@mydomain.com" method="get">

<input name="Subject" type="hidden" value="I Agree To The HR Policies" />

<input name="HRSubmitButton" type="submit" value="I Agree To The HR Policies" />

</form>

Basically it's just a button that says "I Agree To The HR Policies". When the user clicks on the button it opens an Outlook message which would be sent to myself. The problem is that the e-mail subject is changed to "I+Agree+To+The+HR+Policies" instead of having the spaces. I can't seem to figure out how to remove the "+" signs & have the text displayed properly in the e-mail subject.

Any ideas/suggestions?

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
DPyro    780

Try using the html code for spaces -  

Share this post


Link to post
Share on other sites
  • 0
xendrome    5,583

The one above me, or

Maybe try putting it as <input name="Subject" type="hidden" value="I%20Agree%20To%20The%20HR%20Policies" />

?

Share this post


Link to post
Share on other sites
  • 0
-Alex-    101
&lt;input type="button" onClick="window.location='mailto:myemailaddress@mydomain.com?subject=I+Agree+To+The+HR+Policies'" value="I Agree To The HR Policies" /&gt;

Share this post


Link to post
Share on other sites
  • 0
MRM316    13

Try using the html code for spaces -  

That worked. Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.