Modx can't send message with FormIt - email

I try to send a message from my contact form, but I don't receive any message.
I use QuickEmail to test it, and I receive a message on my mailtrap account. I guess the problem is from the contact form (right now I am local).
//Chunk
[[!FormIt?
&hooks=`spam,email,redirect`
&emailTpl=`MyEmailChunk`
&emailTo=`test#gmail.com`
&redirectTo=`123`
]]
<form action="[[~[[*id]]]]" method="post" class="form">
<input class="mb-4" type="text" placeholder="NAME" id="name" />
<input class="mb-4" type="text" placeholder="EMAIL" id="email" />
<textarea class="mb-4" type="text" placeholder="MESSAGE" id="message"></textarea>
<button class="btn btn-success">SUBMIT</button>
</form>
//Second chunk
Name: [[+input-name]] <br/>
Email: [[+input-email]] <br/>
Message: <br />
[[+input-textare]]
<br/>
Agreement check: [[+input-checkbox]]

Do you use SMTP? This maybe important also, please enable it. It offen depends on server settings.so If I understood this properly and you really use local server - all that makes sense also.

You are missing the name parameter, which is required.
<input name="input-name" class="mb-4" type="text" placeholder="NAME" id="name" />
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname

Related

When submit I want to receive the message on my mail (duplicate)

Here's my code for my new website
<div class="single_contant_left">
<form action="#" id="formid">
<!--<div class="col-lg-8 col-md-8 col-sm-10 col-lg-offset-2 col-md-offset-2 col-sm-offset-1">-->
<div class="form-group">
<input type="text" class="form-control" name="name" placeholder="first name" required="">
</div>
<div class="form-group">
<input type="email" class="form-control" name="email" placeholder="Email" required="">
</div>
<div class="form-group">
<input type="text" class="form-control" name="subject" placeholder="Subject" required="">
</div>
<div class="form-group">
<textarea class="form-control" name="message" rows="8" placeholder="Message"></textarea>
</div>
<div class="">
<input type="submit" value="Submit" class="btn btn-primary">
and when I want someone who clikck on submit, i want to receive the message on my personal mail.
Any idea ?
Thanks
First you will need to make sure you know where you want to send the email from. Which computer should send the email? The server where you submit the form, or the client computer on which the web browser of the user is running?
If you want the server to send the email, you will need to write server-side code which will handle the form submit when the user clicks on the submit button. Inside that server-side code, you might use your own SMTP, or you can use a server-side mailer API, there are tons of possibilities and we are not aware of what server-side technology you are using, if any.
Of course you can send the emails from the browser as well, using a client-side mailer API.

Why am I getting an error with the SSL handshake 525 with Formspree on my Github pages site here http://volunteer.tcffo.org/#cta?

<!-- Contact Form -->
<form id="contact-form" method="post" action="https://www.formspree.io/tcffo.volunteers#gmail.com">
<div>
<input type="text" name="Name:" id="name" placeholder="Name">
<br>
<input type="email" name="Email:" id="email" placeholder="Email Address" />
<br>
<div><textarea name="Message:" id="help" placeholder="Message"></textarea></div>
<br>
<input type="submit" value="Send">
<input type="hidden" name="_next" value="//tcffo.github.io" />
</div>
</form>
Code is here.
https://github.com/tcffo/tcffo.github.io
You're using the wrong Formspree URL there. It should https://formspree.io/, without the www., that's why.

formspree.io "Make sure you open this page through a web server ..."

I'm trying to use formspree.io but for some reason is returning the following error:
Make sure you open this page through a web server, Formspree will not work in >pages browsed as HTML files. Also make sure that you're posting to >https://formspree.io/test#yopmail.com.
For geeks: could not find the "Referrer" header.
My code is the following:
<form action="https://formspree.io/test1#yopmail.com" method="POST" target="_blank">
<input type="text" id="name" name="name" placeholder="*First Name">
<input type="text" id="lastname" name="lastname" placeholder="*Last Name">
<textarea id="subject" name="subject" placeholder="*Your Message" style="height:200px"></textarea>
<input type="submit" value="Submit">
</form>
Please notice that I have the s in the "https://fo..." and I also have in my head tag the following:
<meta name="referrer" content="origin">
Thanks for any help.

IE Form redirecting to action

I have the following simple form:
<form id="MyForm" action="../webformmailer.php" method="post" >
<input type="hidden" name="subject" value="Submission" />
<input type="hidden" name="redirect" value="../sandbox/123/thanks.html" />
<input type="text" size="20" name="FirstName" />
<input type="text" size="20" name="LastName" />
<input type="text" size="20" name="email" />
<select name="comment">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<input type="submit" name="submit" value="submit"/>
</form>
I am redirecting users to a simple 'thanks.html' page after they submit their information. This works well in all browsers except IE 8, which redirects users to the webformmailer.php or the action of the form.
Can anyone point me in the right direction?
Thanks
Inside your action script, process the request and then redirect to thanks.html:
header('Location: ../sandbox/123/thanks.html');
Update: since you don't have control over the action script, and all other browsers work exception IE8, then the problem must be in the way IE8 sends data to the server. Try set enctype="application/x-www-form-urlencoded" and see if it works.

I don't want browser to be able to save login details

I'm making a login form, but I don't want browser to be able to save username & password combination.
Just like PayPal or banks.
I have heard that I could do this by using AJAX & Javascript but I'm so unfamiliar with them, so I need to ask help from you!
<form id="loginform">
<label for="username">Username</label>
<input name="username" type="text" value="" required="required" />
<label for="password">Password</label>
<input name="password" type="password" value="" required="required" />
<input type="button" name="doLogin" value="Login" onclick="login(this.form.username.value,this.form.password.value);" />`
With that login form the browser doesn't ask to save the login combo... but now I just need to know how to send the login info to PHP :P
I am assuming that you require the prevention of things like autoformer (for Firefox). Simply change the names of the various input values to something that is different each time the user loads the form.
As Sunny's link suggest, you can use the autocomplete attribute to prevent the browser from suggesting input for a field. So for your example:
<form id="loginform">
<label for="username">Username</label>
<input name="username" type="text" value="" required="required" autocomplete="off"/>
<label for="password">Password</label>
<input name="password" type="password" value="" required="required" autocomplete="off" />
<input type="button" name="doLogin" value="Login" onclick="login(this.form.username.value,this.form.password.value);" />