Mailto URL now not sending email - html

I have just built a landing page: growanimationstudios.instapage.com
In the bottom I have a button to send an email, in the editor I was asked for the URL to redirect and I inserted:
mailto:growanimation#gmail.com?subject=hello world
But as you can see in the live version it results in a error and no email is sent.
What am I missing??

Try:
mailto:growanimation#gmail.com?subject=hello%20world
You cannot use whitespace the way you tried. You have to encode to a url friendly format.
See w3schools guide for URL encoding.
Option 1 - use of anchor
For an <a> tag, you could do:
Send
If you have a <button> just wrap the above anchor in a button. Like this:
<button>Send</button>
Option 2 - use of form
You could also accomplish what you want with the use of a form:
<form action="mailto:growanimation#gmail.com?subject=hello%20world" method="GET">
<input type="submit" value="Send" />
</form>
or
<form name="theForm" action="mailto:growanimation#gmail.com?subject=hello%20world" method="GET">
<button onClick="document.getElementById("theForm").submit();">Send</button>
</form>

Related

How to insert a deep link on html email

I'm sending an HTML email with some informations for the user, however I want to make a deep link for an app.
I tried to make something like this:
<p>Abrir Meu Diário</p>
But when I send the email there is no link on the tag.
Felipe Augusto, may be you can try like this it'll work
<form action="your://linkhere" target="_blank">
<input type="submit" value="value" />
</form>

How to use submit button to go to a URL with HTML

I am only starting to learn to code with HTML, so if this question seems trivial or simple, I apologise in advance.
Suppose I have a form, like
<form><input type="url" name="url"><input type="submit" value="Go"></form>
How do I make the submit button go to the url that the user types in?
You cannot do that using pure HTML. The form will always post/get to the URL which the action attribute of the form points to.
However, with some javascript you can do this.
This should work:
<form id="form" method="get">
<input type="url" name="url" onchange="document.getElementById('form').action = this.value;">
<input type="submit" value="Go">
</form>
What this does is it uses the onchange event of the url input box so everytime that changes, the action of the form is updated.
In addition to the sending the user to the url when they hit submit, are you trying to save the url that is typed in?
If so you will need more than HTML to accomplish this, probably php + sql would be the easiest route to save it.
However, if all you're trying to do is let a user go to the url they are typing in, you could accomplish this through javascript or jquery.
For example in your html:
<form>
<input id="url" type="url" name="url">
<input type="button" value="Go" />
</form>
Then add this jquery:
$('input[type=button]').click( function() {
var url = $('#url').text();
$(location).attr('href', url)
});
Try this: http://jsfiddle.net/p6zxg25v/2/

Spaces converting to '+' from HTML form

So I've been playing around with HTML forms and I am kind of new you all of this so any help would go a long way! But anyway... This is my form coding for emailing.
So when I submit that form with the correct areas filled, it then opens
in Outlook (2010 If that matters) were it then converts the spaces in the
body of the email into '+' (Plus symbols)... Can anyone give me ideas?
This HTML will be used on an offline site within our network and will not
go live. All computers are on the domain and will have access to this
HTML link on there desktop.
You should set the enctype attribute of the <form> tag to text.
<form enctype="text/plain" ...
More details in this KB
In both cases, the FORM data is e-mailed in as an Attachment, in an encoded format. For instance, in the preceding case, this is how the data looks:
Subject=Test+Subject&Body=%09kfdskfdksfkds%0D%0A%09
This is because the default ENCTYPE attribute for the FORM element is "application/x-www-form-urlencoded". To e-mail data in > plain-text format instead, explicitly specify an ENCTYPE attribute of "text/plain". For instance:
<FORM Action="mailto:xyz" METHOD="POST" ENCTYPE="text/plain">
mailto: protocol test:
<Br>Subject:
<INPUT name="Subject" value="Test Subject">
<Br>Body: 
<TEXTAREA name="Body">
kfdskfdksfkds
</TEXTAREA>
<BR>
<INPUT type="submit" value="Submit">
</FORM>
produces the following Body:
Subject=Test Subject
Body= kfdskfdksfkds
You can use %20 for spaces in mailto links. I think you need to convert the + to spaces before you open the mailto link.

how to: question mark in form action

I want to use a button to link to a page. However, the page url is something like domain.com/page?action=register.
I really need this action added to my:
form action="domain.com/page?action=register"
Form attribute, but when I try it with these settings, it will only go to domain.com/page
I've tried encoding the ? into %3F but that doesn't work.
Any help?
The ? values are set by the form, as long as the form's method is set to "get" (rather than "post", which doesn't submit the values in the URL). So, if you want to submit a form to page?action=register, you'd do the following:
<form action="domain.com/page" method="get">
<input type="hidden" name="action" value="register">
It will also pass the other form values along in the URL, creating something like:
domain.com/page?action=register&first_name=john&last_name=doe
EDIT: As #ninetwozero mentioned in a comment, the scenario you describe above should work:
<form action="domain.com/page?action=register" method="post">
[rest of form]
I just tested the above and it passed both the ?action=register and the form values from my form. So, whichever you prefer.
Is "domain.com/page" the page that has the form and button?
Make sure that your button is like this:
<input type="submit" />
Not
<input type="button" />
Otherwise, you could actually use input type "button" with a javascript redirect.
<input type="button" onclick="location.href="domain.com/page?action=register" />
In fact, why use a bunch of form elements if all you want is a button to send you to another url?
<form>
<input type="button" onclick="location.href="domain.com/page?action=register" />
</form>
Not sure if you even need the tags really. Try it.

URL building for login

I am working on a Django project, in which a template login.html has code like -
<form name="input" action="welcome.html" method="get">
--------------SOME FORM ELEMENTS-----------------
<input type="submit" value="Login" />
</form>
When I click on Login, I want URL to be -
http://127.0.0.1:8000/welcome.html
or
http://127.0.0.1:8000/welcome.html?xxxxxxxxxxxxxxxxxx
but url comes out to be
http://127.0.0.1:8000/login.html/welcome.html?xxxxxxxxxxxxxxxxxx
(that is, "action" from form gets appended to the URL instead of getting appended to the domain) where "xxxxxxxx" stands for query submitted through form.
How can I achieve this?
<form name="input" action="/welcome.html" method="get">
You should set the action to be "/welcome.html".
thats really wired, try making your action="/welcome.html"