Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/28/2022 in all areas

  1. This week we have ProcessWire 3.0.201 on the dev branch which includes a couple minor fixes but also a couple of useful additions: There are new "Tab" field visibility options available for any field in the page editor. This makes the field display in its own page editor tab. It saves you from having to create a new/separate Tab field just to wrap around an existing field to make it display in a tab. So far I've found it particularly useful with ProFields (Combo, Table, Textareas, RepeaterMatrix) as well as the core Repeater, FieldsetPage and Images fields. For instance, I have a Combo field labeled "SEO" that lets me edit browser_title, meta_description, canonical_url, etc., and now I can add that field to any template and pages using that template have their own "SEO" tab. Sure you could do this before by creating a separate tab field with an "SEO" label, but now it's a lot simpler/faster, as any field can now display as a tab on its own. Like with the other visibility modes, also included are options to make the tab load dynamically on click with ajax or make the value non-editable. You can also optionally specify a label for the tab independently of the field label. This is because usually you want tab labels to be very short (1 word is best) whereas field labels have no such need. Please note that this new Tab option is exclusive to the page editor, and in order to work the field must not already be in a tab. Also added this week is a new $page->getMultiple() method. This method works the same as the $page->get() method except that it lets you retrieve multiple page property/field values at once and returns them in an array. For example: $a = $page->getMultiple([ 'foo', 'bar', 'baz' ]); list($foo, $bar, $baz) = $a; It also accepts a CSV string: $a = $page->getMultiple('foo,bar,baz'); By default it returns a regular PHP array, suitable for using in list() like the first example. But if you want it to return an associative array instead, then specify true as the 2nd argument: $a = $page->getMultiple('foo,bar,baz', true); echo $a['foo']; echo $a['bar']; echo $a['baz']; I find this method useful in reducing the amount of code/lines necessary in many cases, and most often I use it in combination with a PHP list() call, i.e. list($title,$subtitle,$body) = $page->getMultiple('title,subtitle,body'); That's all for this week. Thanks for reading and have a great weekend!
    6 points
  2. @ryan Thanks for that great update!
    1 point
  3. Don't get me wrong, but these hours would have been better spent on 74€ for a single licence of FormBuilder. No coding required. I own a DEV licence since 2016 and I never think twice about the yearly payment, not even a second! FormBuilder slogan should be: Forms made easy!
    1 point
  4. Hello Wishbone, "Sending emails is not part of this module" means not that emails cannot be send by the forms createt by this module. It means that sending emails will be done fe by the WireMail class of ProcessWire and not by this module class. This module creates and validates forms - not less or more. After the validation process is finished you can do whatever you want: storing data in the DB, sending emails,.... its up to you and you have to write the code for the action after the validation by yourself. Yes, there seems to be an issue on a Mac environment for the moment, but I was not able to reproduce the error. I only got 2 messages from users which had troubles. One problem could be solved, the other is still there, but I am working on it. If you want to install the module maybe I could help you. Best regards
    1 point
  5. @wishbone I fully understand you as non coder as we all try to build things for non-coders, but you also already know that non-coders have also to do a minimum; It wasn't my intention to feel rude (please grab this beer ? ? ) , I was trying to find again a way to say that reading the doc is what could help here. I mean the FormBuilder one, or the tutorial I linked on my previous post. Anyway, back to to your issue. I read the old code you linked, and there is the full code. It works, and if you follow (read again ?) the whole thread lol, you will find the solution for the honeypot technique (page #2 I think posted by @kongondo). About security concerns, there is no breach in the code and can be used as is. But again, without reading the doc, you will eventually get security issues only when you will add more input to the form. I mean here, the $sanitizing technique which give you "control" on the submitted user data. Again, sorry to insist, the FormBuilder module is what you need as non-coder, as I think it doesn't require code to be written, or maybe one line to render the form (I can't confirm, I have to read the doc lol ? ) and give you all the security you will need to stay safe. Code: Try something with the form, and do not hesitate to ask further help here ? Please, believe me, I am speaking by experience, we, coders, are lazy as f***, you can't imagine how ? Edit: Sorry, I didn't paid attention to your third message, you could head to the Job forum to get more attention.
    1 point
  6. Thanks! Now it works fine ? I'm going to have a look at this »Latte«
    1 point
  7. v. 1.2.0 is now released Twitter tags will be rendered by default Added support for image alternative text using custom fields in images Added support for inheriting image from parent pages (including home page) Added support for fallback page for image. If the image cannot be found from the current page (and possibly enabled inheritance fails), the module will try to find the image from the given page. You can use this to define default image for all pages. Fixed crash when passing an empty Pageimages object as an image Fixed crash when supplying an invalid image width or height Note that module now requires PW 3.0.142 or later, as custom fields for image and file fields were introduced in that version.
    1 point
  8. Another quick and easy one ? Place this in /site/templates/admin.php before the require(...) statement: $this->warning('Attention: We have planned maintenance starting 2021/02/11 from 10:00 AM - log out before that date to prevent data loss.');
    1 point
  9. There are no alternatives afaik. Fingerprint is sometimes too much security and creates more problems than it solves.
    1 point
×
×
  • Create New...