Jump to content

sp1ke

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by sp1ke

  1. Hello Juergen, I have followed your suggestion and change the source code of my file (contact.php): $form = new \FrontendForms\Form('contactform'); $gender = new \FrontendForms\Select('gender'); Also I download the latest version from github. I still get an error message as shown in the attached picture. Do you have any idea why? Thanks in advance
  2. Hello Juergen, I tried some changes in the template file - actualy just correct the 'namespace ProcessWire' command (if I don't include the namespace command there is an error message saying that cannot find the 'Form module'). Anyway, now get a new error as shown in the attached pic
  3. Hello Juergen, I test your script in localhost server and worked fine. But when I move site to the live server I got this message: Fatal Error: Uncaught Error: Class 'processwire\Form' not found in site/templates/contact.php:63 #0 wire/core/TemplateFile.php (327): require() #1 wire/core/Wire.php (414): TemplateFile->___render() #2 wire/core/WireHooks.php (951): Wire->_callMethod('___render', Array) #3 wire/core/Wire.php (485): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #4 wire/modules/PageRender.module (554): Wire->__call('render', Array) #5 wire/core/Wire.php (417): PageRender->___renderPage(Object(HookEvent)) #6 /var/www/vhosts/san (line 63 of site/templates/contact.php) I have used the latest version of your module. I am attaching you the form template file to check. The server's PHP version is 7.4.29 Do you have any idea what is wrong? contact.php
  4. Hi Juergen, Thank you again for your very detailed and informative reply. It really made everything crystal clear. These days I am finishing a translation of language csv file in greek. Would you like to send it to you, so you can add it to the module language file? Do you believe it would be better if I send you a separate csv file only with the greek translation so you may just add the new column to your csv file? Have a nice day!
  5. Hello, Thank you for your suggestion to update my PHP version. I will do it asap. I have another question: it's from the README.md file and about the sanitizer: #### setSanitizer() Method to add a sanitizer to the form field. Returns a sanitizer object. You can use all ProcessWire sanitizer methods by adding the sanitizer name inside the parenthesis of the setSanitizer() method. You can also set multiple sanitizer methods to one field if necessary. Please note: For security reasons, the text sanitizer will be applied to each inputfield automatically, so you do not have to add it manually. The only exception is input textarea, where a textarea sanitizer will be applied by default. What confused me is the 'Please note' paragraph. As I cannot understand the difference between inputfield and textarea: which one is automatically sanitized and why textarea is an exception. Do I have manually do the sanitization of the textarea input or not? For the rest, your documentation is excellent. Very clear instructions how to use the module and also a lot of examples. Very helpful - great job! Thanks in advance.
  6. Hi Juergen, I replaced the code in FrontendForms/FormeElements/Form.php line 203 public function add(object $field) // with this code public function add($field) as you suggested and the module is working fine now. Versions information: ProcessWire: 3.0.184 PHP: 7.1.18 (XAMPP server) Thank you for your quick reply. Have a nice day!
  7. Hi Juergen, I made a template based on your example code for simple contact page. But I get an error message: Aw shucks… Fatal Error: Uncaught TypeError: Argument 1 passed to Form::add() must be an instance of object, instance of Select given, called in C:\xampp\htdocs\p20\site\templates\contact.php on line 13 and defined in C:\xampp\htdocs\p20\site\modules\FrontendForms\Formelements\Form.php:203 I am attaching a screenshot of the error message and also part of the template file. Can you please help me on that? Thanks in advance
  8. Hi Juergen, I tried to install the module to processwire (latest version) and got a fatal error: Aw shucks… Fatal Error: Uncaught Error: Using $this when not in object context in C:\xampp\htdocs\p20\site\modules\FrontendForms\FrontendForms.module:41 After changing line 41 in FrontendForms.module and remove the '$this' module installed in processwire. The line 41 changed to: 'summary' => 'Create forms and validate them using the Valitron library.', Just writing this remark as maybe help some other users in module installation. I am going to test your module in the following days. Thanks for your work
  9. Hi I tried to install the module to processwire (latest version) and got a fatal error: Aw shucks… Fatal Error: Uncaught Error: Using $this when not in object context in C:\xampp\htdocs\p20\site\modules\FrontendForms\FrontendForms.module:41 After changing line 41 in FrontendForms.module from:
×
×
  • Create New...