How to send data in form secretly - forms

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

Related

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.

Mail form not working

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...

Can you tell me how to find out where form info goes?

Thank you for taking a look at my post. I have this newsletter form and it appears to be working fine, but I don't know where the information goes!
<form id="subscribe-form" name="sibscribe" method="post">
<label>
<input class="subscribetext" type="text" onFocus="if(this.value =='Enter E-mail:' ) this.value=''" onBlur="if(this.value=='') this.value='Enter E-mail:'" value="Enter E-mail:" name="keyword" />
</label>
<a onClick="document.getElementById('subscribe-form').submit()" class="button" href="Thank You.html">subscribe</a>
</form>
The best way to figure out for you is to go to Firebug Net bug while the page/form submits and inspect the tabs like:
Params| Headers|Responses|XML|Cookies

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.

SEO Url not changing upon form submission

Am using SEO URls to load my pages ie http://www.mywebsite.com/p/page1/100 but am having a problem with my search form. When I click submit, instead of the entire url changing to the stated one in the form, it just appends the variables to the url eg http://www.mywebsite.com/p/page1/100?p=search&q=Any+Query+String+here.
My question is, how do I replace the entire URL with the form variable instead?
Here is my form code:
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="get">
<input type="text" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" name="q" value="Search" />
<input type="hidden" value="search" name="p" />
<input type="submit" value="Search" class="submit" />
</form>
OK I solved it using a hack I think???
Apparently if I append a variable to the action url, this will force the browser to load the new url instead of append the form variable to the existing url.
Eg.
<form action="<?php $_SERVER['PHP_SELF'] ?>?p=search" method="get">
<input type="text" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" name="q" value="Search" />
<input type="hidden" value="search" name="p" />
<input type="submit" value="Search" class="submit" />
</form>
This worked for me but I dunno if it's the right way to achieve this or it's a hack.