Jump to content

FrontendForms - A module for creating and validating forms on the frontend


Recommended Posts

  • 3 weeks later...

Version 2.1.47 is out!!

Now FrontendForms supports Ajax form submission!

Ajax form submission prevents a page reload after the form has been submitted. This could be useful in scenarios, where you do not want a reload (fe if your form is inside a modal box or inside a tab) after the form has been submitted. You can disable/enable Ajax submission by checking a checkbox inside the module configuration, or you can overwrite the global value by using the setSubmitWithAjax() method on per form base.

If you are enabling this feature, a progress bar will be displayed after you have pressed the submit button to inform the user, that the form will be validated now. Otherwise, the user will not see any action until the validated form will be loaded back into the page. If you do not want to show the progress bar, you can disable it inside the module configuration too. With the showProgressbar() method, you can overwrite this global setting on per form base.

In the case, you want to redirect the visitor to another page, after the form has been submitted successfully, you cannot do this via a PHP session redirect, because the form has been submitted via Ajax. In this case a JavaScript redirect has to be done. To force a JS redirect after the submission, you need to use the setRedirectUrlAfterAjax() method. Put the new URL inside the parenthesis, and the user will be redirected to this URL after the form has been validated successful.

You will find a more detailed information about these 3 new methods here: https://github.com/juergenweb/FrontendForms/blob/main/README.md#setsubmitwithajax---use-ajax-for-form-submission

Screenshot of the new Ajax configuration settings:


As always, please test your forms if you are changing to Ajax support and report any bugs directly on Github. A lot of changes have been done, so keep an eye on unwanted side effects.

I have tested it with my other module FrontendContact too and it works without problems if you are using Ajax support.

Best regards!

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...


I'm using your module for the first time, looks really promising 🙂

It seems that password fields *always* show a password toggle, even if the showPasswordToggle() method is not called in user code.

In InputPassword.php, line 105, it unconditionally appends the checkbox:


My solution was the following, but not sure if that won't break other things:

// InputPassword.php

// Line 26
// protected InputCheckbox $showPasswordToggle; // The password toggle checkbox object
protected bool $showPasswordToggle = false;

// Line 85
// $this->showPasswordToggle = $toggle;
$this->showPasswordToggle = true;

// Line 105
// $this->append($this->showPasswordToggle()->___render());
if($this->showPasswordToggle) {


  • Like 1
Link to comment
Share on other sites

Hello @dynweb

Thank you for reporting this issue and offering a solution!!

You are right, there was a logical mistake inside the InputfieldPassword class. I have corrected this wrong behavior and updated the module to 2.1.49.

You can read the complete changelog here: changelog.md

Be aware, that the checkbox will be appended by default and you have to manually disable it by using the following method including false as parameter


Best regards

  • Like 1
Link to comment
Share on other sites

New Class "PrivacyText" added on version  2.1.50

This is a new feature, that offers you to display a text only version (including a link if set) instead of a checkbox version for the "Accept our Terms and Privacy Policy". Thanks to @Chris-PW from the support forum for informing me, that a checkbox is no longer recommended, and a text would be the better option.

Please read the changelog.md for full information about the new feature.

Preview of text without link:


Preview of text including a link to the privacy policy page if set inside the module configuration


Best regards

  • Like 1
Link to comment
Share on other sites

Hello Juergen,

I like the PrivacyText feature but I'm struggling to find a way to translate the text without touching the source file? 

Thanks for your great work!

  • Like 1
Link to comment
Share on other sites

Hello @xweb

It seems that you are new to ProcessWire 😉.

Every text inside the module is translatable in the backend. This feature is called "translatable strings" in ProcessWire. No need to touch the sourcefile!

All you need is to enable language support in the backend. You will find it under Modules/core:


After you have installed it, a new navigation item called "Languages" appear under Setup:



After clicking this navigation point, you will be redirected to a page, that contains all installed languages. In your case it is the language "default". Click on it and you will be redirected to the translation page, where you can translate every translatable string of the whole installation.


The last step ist to find the file, where the text for the privacy could be translated. It is called privacytext.php.json.


Click on edit and translate the text to your needs.


Thats all!!!!

I recommend you to study the multilanguage feature of ProcessWire and how translatable strings work.

Hope this helps! Best regards!!


Link to comment
Share on other sites

Just to mention: If you do not find the privacytext.php.json file, you have to add it first.

Click at the top at the "Find Files To Translate" Button.


Look at the first scroll-down field "Translatable files in /site/" inside the category "No translation files exist" and look for the file there. If you have found it, click on it and click the "Submit" button on the top right corner.


Now you will find the file as written in the previous post.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...