Problems when submitting a form in TYPO3 v9.5 - typo3

In TYPO3 versions before v9, when using the native form, I always disabled the cache of that specific "contact" page (where the form was placed). If I didn't disable the cace, the form wouldn't redirect to my "confirmation" (v6/v7) or "redirect" page (v8), but instead it would simply reload the (filled-out) form (on the same page).
So, to bypass this and to make sure that the form actually got submitted and forwarded to the correct confirmation page, I always disabled the cache (Page Properties -> Page -> Behaviour -> Disable cache).
In TYPO3 v9 however, this option has been removed, and adding config.no_cache = 1 into that specific page (in a TS template), doesn't seem to do the (same) trick.
I would expect that the form, after clicking the submit button, would forward to the confirmation (redirect) page which I configured insde the form itself. That confirmation page isn't usergroup-protected or anything, it's simply a sub-page of the "contact" page (containing the form) itself.

The actual issue in this case is that you are most likely using some kind of autofill for your fields, e.g. from Chrome or using a form filler extension.
This will also fill the honeypot field of your form which then prevents submitting the form.
Right now there is nothing you can do about this except voting for the bug in the Chromium issue tracker.

As Mathias Brodola righfully points out, this seems to be a problem in Chrome only. I found this following plugin - that completely disables autocomplete support for a form - to be helpful in this matter. It solved my issue (however, it does completely disable auto-complete support for the form):
https://github.com/terrylinooo/jquery.disableAutoFill

Related

Powermail broke on first click to submit

I have an error with my powermail form.
I copied one form from my site and made some little changes and now the new form doesn’t work right.
When I click on submit the form isn’t send it only “destroys” the frontend and I have to fill the fields new to submit it (then it works).
I have this warning in the console: Parsley’s pubsub module is deprecated; use the ‘on’ and ‘off’ methods on parsley instances or window.Parsley
Do you have any idea?
I’m new in the project and don’t created the first form.
Powermail: 3.22.1
TYPO3: 7.6.30
I would check if there are any redirects while form submitting. If forms are getting submitted and it seems that they are reloaded and empty, it often happens, that the form target is wrong.
E.G. If absRefPrefix is set to http:// and there is an additional .htaccess redirection from http:// to https// or so the POST params get lost and powermail shows the form again.
You can check redirects in your browser console.

Angular 2 new form, on submit redirecting to same page with form fields appended in URL as query params with new Router version

I was updating my old running application to newer angular version. It was working good with older version.
On one of my page, I have used form, so when I updated angular/forms to 0.2.0 version with component router version 3.0.0-beta.1. The issue I'm facing is when I tried to submit form, it redirects to same page and appending all the entered value in query parameter.
Here is Plunkr with Problem statement
Steps to reproduce issue:
You will get landed on "CRISIS CENTER" page, select any record from it.
Edit some text, and then click on submit button & check the URL in navigation bar.
Note
I'm using template driven form(I don't think so this will make any difference).
Open Plunkr in Preview window(new tab where you can see running application URL)
I had the same issue, but it wasn't happening on every route, which was frustrating to debug.
I ended up adding a preventDefault on the normal form submit and found out that there was an error on my page upon running through my ngSubmit method. Once I fixed that error, I was able to remove the preventDefault and it worked the way it's supposed to (without appending the query params).
html
<form (ngSubmit)="submitForm()" (submit)="preventDefault($event)">...</form>
ts
public preventDefault(event: Event): void {
event.preventDefault();
}

Refreshing the page even if error message is shown

I'm using umbraco CMS and have a problem with my form.
I've added error messagges if some of the fields are empty.
If you click on "submit" the page is refreshing, and you need to scroll down again to the form section in order to view the error messages.
I did a lot of changes in the form section (design) but can't find a solution to the problem.
Has anyone had the same issue?
Are you using the new UmbracoForms implementation?
This sounds to me like a script or style issue. You should track when the user has submitted the form and after the submission (if there are errors present) scroll down to form section.
Your second option would be submitting form through AJAX, but new UmbracoForms don't currently support it: related discussion.

Wicket: Loosing form input on page re-render

I have pages with forms. Everything is working fine. Except, that there is a link (language selecter) on the pages. The requirement is, that when the user has already input in the form fields and than (without submitting the form) is clicking the link, all input should be retained.
If the link would be part of the form, this could easily archived via a SubmitLink and submitLink.setDefaultFormProcessing(false);
Unfortunately, this link has no knowledge of the form(s) on this page.
Any pointers if this is solvable? Of course, validation should not be triggered.
client-side JavaScript solution
wrap complete page content in a form
(yes, Wicket allows nesting of forms) and use an SubmitLink with
defaultFormProcessing=false
add an AjaxFormComponentUpdatingBehavior
to all your form fields, so the input is always sent to the server

Is there a predefined webpart called CAPTCHA webpart?

How would I go about creating a CAPTCHA plugin for the framework Kentico CMS 7.0?
Is there a predefined webpart called CAPTCHA webpart?
There are few form controls of CAPTCHA type. Navigate to Site manager -> Development -> Form controls and filter out CAPTCHA controls. You'll find e.g. "logic captcha" or "text captcha". You can use those controls e.g. in forms (this is typical usage) or anywhere else (just see properties of particular control).
If you want to prevent robots posting to your forms edit the form, add a text field and select CAPTCHA of your choice as a form control.
In addition to the built in CAPTCHA controls, you can also build your own reCAPTCHA control rather easily. The instructions are listed on this Kentico DeveNet forum post. Note that for step 5, instead of using the code listed in the first post, use the code in my reply to the initial post ('Gavin_Paolucci-Kleinow-URMC.Rochester - 1/4/2013 11:05:53 AM' since I can't link to that individual post in the thread).