Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/04/2022 in all areas

  1. Hi @GradDev, The $pageData = $pageData->unique() line is redundant because WireArrays/PageArrays never contain duplicates unless you specifically allow them using setDuplicateChecking(false). I can't reproduce the issue here - the order of items in a PageArray is the same as the order I add them in and they are not ordered by ID. In my example I am adding countries: But you can see that when adding an item that already exists in the PageArray, the earlier item is removed - Finland, Iceland and Ireland are added in the last append() but would already exist in the PageArray. If you wanted pre-existing items to maintain their earlier position in the PageArray you could modify the selectors so that items in the PageArray are excluded:
    4 points
  2. From the PW side the install option is missing) I've created one for my own purposes and happy to share with the community: https://bitbucket.org/valieand/pw Someone who has more time and competence can fork and polish it in order to add to official install options.
    2 points
  3. A big thanks to you, @Robin S! The already existing pages being removed was the issue, you're correct. I excluded the existing pages as you mentioned and it works as expected.
    1 point
  4. @Pete Glad the module is working for you! Yeah, the bypass permission will be a useful addition. I agree that this permission should hide the input field completely. Not sure if I can prevent the input field wrapper markup from showing up altogether, I'll have to give that a try. One thing I'm concerned about is that superusers won't see the hCaptcha input at all, so some site admins might think the module is broken if they add the inputfield to a form and don't see it in the frontend (unless they test in a private browser window). Maybe instead of hiding the inputfield, it should display a static message? Something like The captcha is hidden because you're already a verified user. Or is that too confusing for users? Anyway, I'll try to build this in a feature branch this week for testing purposes!
    1 point
  5. Ah, that's more than I knew. In that case this is good for me to know about too! Thanks for that, and for your module solution!
    1 point
  6. ProcessWire's core comes with a lot of helpful debugging tools and capabilities built-in. In this post we'll cover some of these useful tools and how to use them— https://processwire.com/blog/posts/debugging-tools-built-in/
    1 point
  7. This module is great - thank you. I'd love to see the addition you mentioned above though as there are some forms where I only want to display hCaptcha to guest users since logged-in users on the site I'm working on are already validated by this point. I guess the permission should just hide/not render the form and skip it during form validation but not sure how easy that is. I guess the way to do that in the meantime would be via hooks, so using your example below from the docs, but only target visitors who aren't logged in and render it for just those visitors: <?php // site/init.php wire()->addHookAfter('ProcessPageEdit::buildForm', function (HookEvent $event) { $form = $event->return; $submitButton = $form->getChildByName('submit_save'); if ($submitButton) { $hCaptcha = $event->wire('modules')->get('InputfieldHCaptcha'); $hCaptcha->set('label', __('Spam Protection')); // ... configuration goes here $form->insertBefore($hCaptcha, $submitButton); } $event->return = $form; }); I'll give that a go and see how I go.
    1 point
  8. Yes, webp only is an output format, not a source image or master image format. If you want to use only webp as original image and output image (WITHOUT resize methods) you can use it within a files field. Within image fields is not supported and doesn't make much sense.
    1 point
×
×
  • Create New...