Jump to content

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


Juergen
 Share

Recommended Posts

  • 3 weeks later...

Hi @Juergen, first of all, thanks for the module, it seems to be a time savior !

I now have a (probably very dumb) question, I've tried to use your code from "Create the first form" in your documentation. It worked nicely and as expected. However I left my computer and when I came back I refreshed my localhost page, got an error message mentioning that the amount of time for submitting the form had been way too long and that it could be bot behavior. My bad on this... The thing is that now I can't seem to be able to render the form anymore. Any idea on how to allow myself to keep working/discovering your module?

Best,

Link to comment
Share on other sites

Hello @marie.mdna

Glad to hear that you are using the module. 🙂

What you are describing is a security feature (especially for SPAM bots). Refreshing the page does not help, because a session to prevent the form display is active. You have to close all browser windows to delete the session. Afterwards the form will be displayed again.

This security feature is enabled by default, but you can disable it if you want. You only have to set the max time value to 0. You will find more information here.

You can change the setting inside the module configuration or on per form base inside the template. By default a value of 1 hour is set as max time, but you can set a higher number or 0 to suppress the measurement of the time.

Hope this helps!

Best regards

Link to comment
Share on other sites

  • 1 month later...

hello jürgen,

thanks a lot for your work!

while getting 5 spam mails during the first 12 hours of having my form online (even using honey pot option) i decided to enable a captcha. but that doesn't show!

PHP 8.1.22
processwire 3.0.224
frontendforms 3.1.45

phpinfo():

GD Support 	enabled
GD headers Version 	2.3.0
GD library Version 	2.3.0
FreeType Support 	enabled
FreeType Linkage 	with freetype
GIF Read Support 	enabled
GIF Create Support 	enabled
JPEG Support 	enabled
PNG Support 	enabled
WBMP Support 	enabled
XPM Support 	enabled
XBM Support 	enabled
WebP Support 	enabled
BMP Support 	enabled
TGA Read Support 	enabled
Directive	Local Value	Master Value
gd.jpeg_ignore_warning	1	1

the HTML output is:

<div class="form-control captcha" id="contact-captcha-inputwrapper">
  <div class="image-wrapper">
    <img class="captcha" alt="Captcha" src="/captchaimage.php?formID=contact&amp;cat=text&amp;type=SimpleMathTextCaptcha" id="contact-captcha-image"></div>
  <div class="reload-link-wrapper">
    <a class="reload" href="#" title="Click to load a new captcha" id="contact-reload-link" onclick="reloadCaptcha('contact-captcha-image', event)">Reload image</a>
  </div><input id="contact-captcha" name="contact-captcha" type="text" class="input" required="">
</div>

889813478_Screenshot2023-09-11102520.jpg.f2baa76f8df814fc87d00447dc9ee3c9.jpg

any idea?

edit: an error 500 is reported for captchaimage.php

 

Link to comment
Share on other sites

thanks for your quick answer, jürgen!

more than strange: the file was not even in the directory at all!
usually i'd expected a 404 error.

is the generated path correct?

https://www.domain.de/captchaimage.php?formID=contact&cat=text&type=SimpleMathTextCaptcha

best

Link to comment
Share on other sites

Yes the path is correct, because the captcha image must be reachable for public viewing. If the file is not present at this place (for what reason ever) please add it manually to the root (like the index.php).

12 minutes ago, herr rilke said:

more than strange: the file was not even in the directory at all!

The file will be copied during the installation process of the module to the root directory and will be deleted afterwards from the original place under FrontendForms/Formelements/Captcha/. So this is a usual behavior ;-).

After de-installation, the file will be copied back to the original place. So it will be inside the directory again.

Link to comment
Share on other sites

Glad you get it working 😃!!

4 minutes ago, herr rilke said:

and can i translate the wording?

Every phrase of the module is translatable. You have to do it in the admin area under (setup->languages) or in German (Verwaltung->Sprachen). If you need the German translations, you can use the language pack, that is shipped with this module and you can install all the German translations (for frontend and backend with one click).

1759732165_Screenshot2023-09-11at15-45-43ModuleFrontendFormswebseite2_at.thumb.png.437633c6a1b020a8d872e692f2040a2f.png

(look for languages inside your module configuration).

13 minutes ago, herr rilke said:

any chance to wrap the input field?

Only just to be clear: Do you mean only the input field where you have to add the CAPTCHA value or the whole CAPTCHA (image and input field)?

Link to comment
Share on other sites

Hello herr rilke!

I have added an additional wrapper for the CAPTCHA input field, so you can style it according to your needs. You have to replace the following 2 files with the one from Github (alternatively you can also download and install a fresh copy from Github).

Now the following wrapper will be added:

<div class="captcha-input-wrapper">
  <input id="contact-captcha" name="contact-captcha" type="text" class="input" required="">
</div>

As you can see a new wrapper with the class "captcha-input-wrapper" will be added arround the CAPTCHA input field. Hope this helps.

Best regards

  • Like 1
Link to comment
Share on other sites

OT: That is one main point that attracted me. I've been working with Contao for years, but it's complicated in another dimension and very error-prone in setup and update when dealing with different  customer environments. It consumes hours of my time in places I can't foresee. (but has a built in form builder 🙂)

Link to comment
Share on other sites

5 minutes ago, herr rilke said:

but has a built in form builder 🙂)

There is also a commercial form builder module available for Processwire, which have a UI to create the forms. This will be easier than my approach, but you have to pay for it. 🙄

Link to comment
Share on other sites

13 minutes ago, herr rilke said:

i still receive at least 3 spam emails a day.

Thats bad! Do these spam mails always come from the same sender??

The problem is that spam bots are going to get always better and better. You are using the math captcha and I know that some spam bots can solve this captcha type. They can also solve random string captchas, because they can read the content of images.

My tipp:

You have got multiple different captchas to choose - use another one like the image captcha. You can also try to increase the level of distortion lines which makes it much more difficult for spam bots to read the content behind. All captcha configuration can be done in the backend.

It will be trial and error to find the right captcha which works best.

Would be interesting if someone else struggles with spam mails by using this module.

Best regards

Link to comment
Share on other sites

Good choice! I guess (hope) that this will put spam bots into troubles. The "every second letter" captcha should also be a difficult task to solve for spam bots, but time will tell and we will see what happens. I am already curious 🙂!

Good luck

Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

×
×
  • Create New...