-
Posts
1,427 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Juergen
-
Version 1.0.2 is out now! This new version includes a new privacy feature: you can now not only decide whether or not to display an "Accept Privacy" checkbox - you can now choose to display a checkbox, a text-only version, or nothing at all. The idea for this new feature comes from a request from @Chris-PW on the forum, who brought to my attention that a checkbox to accept privacy is no longer recommended and a simple text like "By submitting the form you agree to our privacy policy" is much more common nowadays. With the new feature, you can use the type of privacy notices you want. Before you update this module, you should first update FrontendForms to the latest version, because it contains new methods used by this module. Otherwise, ProcessWire will not let you install the new module version. After updating to the latest version, go to the module configuration, open the Privacy Field tab to make your settings, and save the module configuration. Go to the frontend and verify that the contact form displays correctly with the new settings. As always, make sure everything works as expected and please post any issues you encounter directly to GitHub. Have a nice Sunday!?
-
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
-
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 showPasswordToggle(false); Best regards
-
Version 1.2.5 is out!! This version now supports Ajax form submission, which can be enabled in the backend configuration. In order to use it, you have to update FrontendForms to version 1.2.47 first, which includes all changes to support Ajax form submission. You can read more about this new feature in the FrontendForms forum. Best regards
-
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!
-
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
-
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). AbstractTextCaptcha.php AbstractImageCaptcha.php 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
-
Glad you get it working ?!! 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). (look for languages inside your module configuration). 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)?
-
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). 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.
-
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
-
Strange behaviour on hook after page render
Juergen replied to Juergen's topic in Module/Plugin Development
Thanks! This is an interesting approach, that I have never used before. This is what I get so far: 0 =>array 'file' => 'C:\xampp\webseite1\wire\modules\Process\ProcessPageView.module:184' 'call' => '$page->render()' 1 =>array 'file' => 'C:\xampp\webseite1\wire\modules\Process\ProcessPageView.module:114' 'call' => 'ProcessPageView $process->renderPage(Page $obj, PagesRequest $obj)' 2 =>array 'file' => 'C:\xampp\webseite1\index.php:55' 'call' => 'ProcessPageView $process->execute([ true ])' 1) returns the string as expected -> OK 2) returns the string as expected -> OK 3) returns the string as expected -> OK Unfortunately, every 3 calls return the HTML code as a string as expected, but thank you for this tip - I will keep this in mind for the future ? -
Strange behaviour on hook after page render
Juergen replied to Juergen's topic in Module/Plugin Development
I only can confirm that $event->return is null inside the addAssets() method, but I cannot find out, where it probably happens earlier. So the $event variable which will be entered as the parameter inside the brackets has null as return parameter. Is there way to find out WHERE the problem could be? -
Hello I have discovered a strange issue after running a hook after page render. So this is the hook that I run within the init() method inside a module: public function init(){ // add CSS and JS links to the frontend template $this->addHookAfter('Page::render', $this, 'addAssets'); } protected function addAssets(HookEvent $event):void { $page = $event->object; // don't add this to the admin pages if ($page->template->name === 'admin') { return; } $version = $this->getModuleInfo()['version']; if (!$this->input_removeJS) { $js = '<script src="' . $this->wire('config')->urls->$this . 'frontendforms.js?v=' . $version . '"></script>' . PHP_EOL; $event->return = str_replace('</body>', $js . PHP_EOL . '</body>', $event->return); } if (!$this->input_removeCSS) { $css = '<link rel="stylesheet" type="text/css" href="' . $this->wire('config')->urls->$this . 'frontendforms.css' . '"/>' . PHP_EOL; $event->return = str_replace('</head>', $css . PHP_EOL . '</head>', $event->return); } } This hook method adds a javascript script tag and CSS link tag to the page on the frontend. So far so good. It has worked til now until problems. Now I have added this code to a newly created module, but now it does not work in this case. Take a look what Tracy says: You can see the calls of 2 different modules using the same hook after page render code: The first one is the new module and the second one is from my FrontendForms module. Just to keep in mind: both modules use the same hook and the same hook function to add script and CSS to the frontend. As you can see, the first module returns "null", but should return a string. The second one (the FrontendForms module) returns a string as expected. I cannot see any problems via Tracy, so I have no idea, why this happens. The only difference that I can see is on the id key: 'id' => 'Page:100.3:render' 'id' => 'Page:100.0:render' Does anyone has an idea, what could be the cause, that the first hook returns null instead of a string???? Thanks in advance
-
Hello @Matze No, not by default, but I have added a new method which counts the times set: getNumberOfTimes() You can use this method to do a check, but you have to update to version 1.2.0. Best regards Jürgen
-
Version 1.1 out now! This version includes feature requests according to mark-up rendering and a new field configuration to show/hide Holiday. As always, please test it carefully after update and report problems. You will find the full list of changes here: CHANGELOG.md Please read it carefully to see, what is new
-
Hello @ngrmm I am sorry, but this does not work out of the box, but if you want to display a default image if no image was uploaded, you can do it the way as explained here: https://processwire.com/talk/topic/18761-solved-when-default-field-value-is-an-image-file/?do=findComment&comment=163685 Best regards
-
Please be patient - I will add surrounding tags for the dayname and the time(s) for that day, so you will be more flexible. The tags will be variable, so you can choose if you want fe dt and dd or div and span or whatever. The other tags (ul and li) should be also flexible, so you could change them to your needs. Every tag should also be disabled by adding false instead of a tag name - thats my plan. Maybe I can bump up the version with the changes today - we will see ?