Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/09/2023 in all areas

  1. You don't need a different field for this scenario. You can use template overrides for the field settings. In the field settings (Overrides tab): Then from the template settings, edit the field in template context:
    2 points
  2. Thanks @bernhard - should be fixed in the latest version.
    1 point
  3. Oh! I just did not realize that one. Thanks a lot!
    1 point
  4. I would add a new field with your requirements and migrate the contents from the "old" to the "new" field. Here is how I did it for a migration from a single image ("image") to a multiple images ("images") field: $gearPages = $pages->find("template=products-view-gear, include=all"); foreach($gearPages as $p) { if($p->image) { $p->of(false); $p->images->add($p->image); $p->save(); } }
    1 point
  5. @FlorianA I know your question is a bit old, but I just recently had to do this and below is how you get the form data. In my case, I put it all in a custom module. Gets called after an update is made at /admin/profile/ public function init() { $this->pages->addHookAfter('ProcessProfile::execute', $this, 'sendOutProfileNotification'); } public function sendOutProfileNotification(HookEvent $event) { $event = $event->object; //form data is found in $data = $event->return; //do something with data here is data is not null. } Hope that helps.
    1 point
  6. Glad to hear my suggestion works. Don't bother about that text in notifications. It's part of a default mail template, but the option to mark solutions isn't enabled in the forum.
    1 point
  7. It took some investigating and it would be great to have this made more obvious in any documentation for $config->pagefileSecure... Behind the scenes pagefileSecure is using $files->send(): And $config->fileContentTypes forces download for certain extensions based on whether the content type is preceded by a + sign. You can override the default for the pdf extension in your /site/config.php and then the files should display in the browser: $config->fileContentTypes('pdf', 'application/pdf'); // No plus sign before the content type
    1 point
  8. RedBeanPHP is a simple and easy-to-use ORM, and this module is a lightweight ProcessWire wrapper and/or loader for it. The main task of the module is loading and setting up RedBeanPHP with database credentials from $config. There are some config settings for defining how RedBeanPHP should behave, and the module also exposes some often-used methods, but that's just about it. For more details (including a rant about why one might prefer separate ORM in some cases), take a look at the README file. Please note that, for almost all use cases, the data modeling features of ProcessWire are much better choice than a separate database structure of your own, but in those rare cases where that's not the situation, it's good to have options. This module was a side product of one of my own projects, and I thought I might as well share it with you folks. You can grab the module from GitHub: https://github.com/teppokoivula/RedBeanPHP.
    1 point
×
×
  • Create New...