Mail form not working - typo3

I have set a basic mail form in TYPO3 but it doesn't seem to be working.
The installation of TYPO3 I am working on has several sites on it and other existing forms work just fine and don't appear to have any major differences to this new one that doesn't.
When the submit button is clicked the page adds ?tx_form_form[action]=process&cHash=xxx... to the url and does not send any mail or go to redirect page.
This form appears on the home page, and identical form on an internal page works fine...
Anyone know what might be the problem here?
Generated Form Code:
<form enctype="multipart/form-data" method="post" name="id-23" id="field-23" action="http://example.com/?tx_form_form[action]=process&cHash=b34b10df4ff74dac67960e990e130408">
<div>
<input type="hidden" name="tx_form_form[__referrer][#extension]" value="Form" />
<input type="hidden" name="tx_form_form[__referrer][#vendor]" value="TYPO3\CMS" />
<input type="hidden" name="tx_form_form[__referrer][#controller]" value="Frontend" />
<input type="hidden" name="tx_form_form[__referrer][#action]" value="show" />
<input type="hidden" name="tx_form_form[__referrer][arguments]" value="YToxOntzOjU6Im1vZGVsIjthOjA6e319a4f0ce18ed8a7ca3ab5be6c9bc69bc141296c7da" />
<input type="hidden" name="tx_form_form[__trustedProperties]" value="a:1:{s:7:"tx_form";a:5:{s:10:"first_name";i:1;s:9:"last_name";i:1;s:5:"email";i:1;s:8:"postcode";i:1;i:6;i:1;}}bbd972ea3852e6c16fab76a45b46929ac7ab0d52" />
</div>
<ol>
<li class="csc-form-24 csc-form-element csc-form-element-textline">
<label for="field-24">
</label>
<input placeholder="First Name" id="field-24" type="text" name="tx_form_form[tx_form][first_name]" required="required" />
</li>
<li class="csc-form-25 csc-form-element csc-form-element-textline">
<label for="field-25">
</label>
<input placeholder="Last Name" id="field-25" type="text" name="tx_form_form[tx_form][last_name]" required="required" />
</li>
<li class="csc-form-26 csc-form-element csc-form-element-textline">
<label for="field-26">
</label>
<input placeholder="Email" id="field-26" type="text" name="tx_form_form[tx_form][email]" required="required" />
</li>
<li class="csc-form-27 csc-form-element csc-form-element-textline">
<label for="field-27">
</label>
<input placeholder="Postal Code" class="signup-sml" id="field-27" type="text" name="tx_form_form[tx_form][postcode]" />
</li>
<li class="csc-form-28 csc-form-element csc-form-element-submit">
<label for="field-28">
</label>
<input type="submit" id="field-28" value="Submit" name="tx_form_form[tx_form][6]" />
</li>
</ol>
</form>
I don't know if it's related but all that extra spacing in the code has been showing up since upgrading the TYPO3 version...

I had a similar issue with a form not being functional in one website and perfectly OK in another.
Setup: TYPO3 7.6 installation with two websites, each with its own domain, both using the builtin system extension form and the extension realurl.
Issue: Within the first website all forms were functional, within the second submitting the form only resulted in the page being reloaded without any validation or action.
Solution:
(1) Make sure that both websites' starting pages are marked as "Root Page" and that both have domain records defined.
(2) Having realurl setup with automatic configuration, I forced an update by deleting the "realurl_autoconf.php" in the "typo3conf" folder.
(3) Make sure that both websites have the correct realurl configuration within their templates' typoscript setup, e.g.:
config {
prefixLocalAnchors = all
absRefPrefix = http://www.domain.tld/
absRelPath = /
tx_realurl_enable = 1
}
In my case I'd simply forgotten the www in the absRefPrefix for the second website...

Related

How to send data in form secretly

I want send hidden data with form.
my code is:
` <form action="my address" method="post">
<div>
<label for="title">Post title:</label>
<input type="text" id="title" name="title" value="My excellent blog post" />
</div>
<div>
<label for="content">Post content:</label>
<textarea id="content" name="content" cols="60" rows="5">
This is the content of my excellent blog post. I hope you enjoy it!
</textarea>
</div>
<div>
<button type="submit">Update post</button>
</div>
<input type="hidden" name="seckey" value="34657" />
</form> `
I use hidden input, but is not safe.
I want to send "seckey" secretly in a way ,that is not available in any way and anybody not access it. Completely safe
but if I use hidden input, the "seckey" is visible in the source page or inspect element in browser.
How to post the "seckey" in the form without it even being clear in the page source

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.

How to Add CAPTCHA ControlForm into page

I found CAPTCHA Control in Kentico and it's Types (Simple - Logic - Text) CAPTCHA
Now, how can I add it inside WebZone?
I tried using it as a WebPart but it's not like webparts can be added inside Zone
What Steps Should i Follow?
</div>
<div id="MessageForm">
<div class="feedback_form">
<h2>Feedback</h2>
<div class="feedback_input">
<span>Name</span><input class="text_feedback" type="text" value="" />
</div>
<div class="feedback_input">
<span>Email</span><input class="text_feedback" type="text" value="" />
</div>
<div class="feedback_input">
<span>Subject</span><input class="text_feedback" type="text" value="" />
</div>
<div class="feedback_input Message">
<span>Message</span><textarea class="Message_input" rows="4" cols="50"></textarea>
</div>
<div class="feedback_input">
<input class="send" type="submit" value="" />
<img src="image/Captcha.png" />
<input class="type_Captcha" type="text" value="Enter Captcha ... " />
</div>
</div>
</div>
</div>
That's what i'm trying to do.
Replace the html Code inside my form for this areaZone and put customize webpart if available to do the required function.
You can use out of the box functionality called Forms. See "Creating a new form" in documentation and just add CAPTCHA as one of the fields. Then use On-line form web part on your web site. That's all.

Do not understand form action right

This is the first time I've try to use a formulae to make a contact page on my site.
This is the code I use (and tried to adapt for my purposes):
<div id="main" class="content container bottom clearfix">
<div class="cont row">
<!-- FORM-->
<div class="form sevencol" style="width:52%">
<form action="mailto:contact#stefanseifert.com" id="contactForm" method="post">
<ul class="contactform">
<li><input type="text" name="contactName" id="contactName" value="" class="required requiredField"/>
<label for="contactName">Name</label>
</li>
<li>
<input type="text" name="email" id="email" value="" class="required requiredField email"/>
<label for="email">E-Mail</label>
</li>
<li class="textarea">
<textarea name="comments" id="commentsText" rows="10" cols="10" class=" required requiredField"></textarea>
</li>
<li>
<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6Lf-ueMSAAAAAExUbwjvdqnNuNjlkeN3_wQyl720"></script>
<noscript>
<iframe src="http://www.google.com/recaptcha/api/noscript?k=6Lf-ueMSAAAAAExUbwjvdqnNuNjlkeN3_wQyl720" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>
</li>
<li class="buttons"><br>
<input type="hidden" name="submitted" id="submitted" value="true"/>
<button type="submit" class="submit superlink">E-Mail senden</button>
</li>
</ul>
</form>
</div>
<!-- END FORM-->
</div>
The result of it, is that every time I test it my Email program opens and fills part of the code inside a new mail of mine.
What is wrong here?
What I wanted was that a mail with the content of the input fields is sent to me, instead!
Appreciate your help!
Thanks very much
Garavani
You can't send an email out of the browser.
<form action="mailto:contact#stefanseifert.com" ... specifies what should happen, once the form is submitted. This action opens the standard email client to send an email to that address - that's what you experienced.
if you want the email to be sent automatically by a server to you, you need to implement it in php, c#, java - or any other language on that server, and send the form data to the server

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);" />