Jump to content

fuzendesign

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by fuzendesign

  1. @Jan Romero thank you. I really appreciated this mini tut. It would be awesome to see more of this. Breaking down a single challenge. And then newbies like me can build upon each and utilize each principle as needed. I don’t know if this repo is open to contributions but it would be a nice inclusion here: https://github.com/webmanufaktur/processwire-snippets
  2. I’m positive they weren’t rendering. I’ve been coding my page for days and couldn’t figure out why there was no output for them. My code makes the left and right arrows appear. (see screenshot) And your code shows 'prev' and 'next'. (see screenshot) I took the code I used from UIKit’s most recent docs. Either execution works for me. Thanks for adding your input.
  3. Referencing this page: https://processwire.com/api/ref/markup-pager-nav/ The options array for UIKit should read as follows for nextItemLabel & previousItemLabel: // Change options for Uikit "uk-pagination" navigation $options = array( ... 'nextItemLabel' => "<span uk-pagination-next></span>", 'previousItemLabel' => "<span uk-pagination-previous></span>", ... ); Otherwise with UIKit 3 the arrows don’t render.
  4. There you go ?. Thanks for responding to my Reddit post. It **really** is an honor.
  5. @bernhard you are a gem in this community. I knew I had ran across that code from a trusted source. Anyways, somehow everything seems to be working fine this morning. Love it and thanks!
  6. I installed it a few days ago on the recommendation of another developer here. It **is** awesome. I think it would take a while to understand its power but I was able to gleam a few things from it that helped. Thank you @gebeer! P.S. - Do I have to edit the title of this thread to “[SOLVED]"?
  7. Funny. Unpoly has been on my try list for months. I bookmark and articles I find. Same with HTMX.
  8. So great to hear. I’ve been following HTMX for a while. I like the dev’s pragmatism. Makes me think of Ryan and PW also.
  9. I could have sworn I grabbed that from code Ryan or an experienced developer here had use in answering someone’s question.
  10. Assuming I go with your code, just to test and using PW docs code—without specifying a template—my email still doesn’t fire on even the most basic example: (My understanding is that this should fire on any page being published on the site. I want to narrow it down to just a specific template, but reducing things to the most basic, can’t figure why this won't work…and yes, I tried various combinations of this code and other for the last few hours.) wire()->addHookAfter('Page::published', function(HookEvent $event) { // Get the object the event occurred on, if needed $pages = $event->object; // Get values of arguments sent to hook (if needed) $page = $event->arguments(0); // your code: $page = $event->arguments[0]; $message = $mail->new(); $message->subject('Hello world') ->to('externalemail@gmail.com') ->from('email@mysitedomain.com') ->body('Hello there big world') ->bodyHTML('<h2>Hello there big world</h2>'); $numSent = $message->send(); });
  11. I want to send an email when a page is published or updated. Specifically a template (temp_order_detail). For now, I just want to get the page-update code working. Why does the following code not send an email? I’ve tried using a from address of both my PW admin address and one tied to the domain the site resides on. Neither addresses work. Is there a whitelist in Processwire for valid emails to send from? I have this code in site > ready.php file: wire()->addHookAfter('Pages(template=temp_order_detail)::published', function(HookEvent $event) { // Get the object the event occurred on, if needed $pages = $event->object; // Get values of arguments sent to hook (if needed) $page = $event->arguments(0); // your code: $page = $event->arguments[0]; $mail->new(); $mail->subject("Your order ".$page->title."has been submitted..."); $mail->to("testemail@gmail.com"); $mail->from("emailaccount@mydomain.com"); $mail = bodyHTML("<html><body><p>Your delivery order has been created.</p><p>Blah blah blah ".$page->title."</p></body></html>"); $mail->send(); });
  12. No worries @gebeer. You are correct, I should have just hooked into Form Builder and grabbed what I needed there. I’m learning as I go. I’ve never used hooks and this is my first true use of Form Builder. Your efforts were not in vain. I learned much from it that I’m using what I learned for another part of my mini app. The alternate direction I took was passing a Customer ID from form 1…onto form 2…and then querying the email there. It was a much better and smarter solution than I had initially planned since knowing the customer (ID) would allow me to auto populate a field with just **that customer”s** email, instead of sending all customer emails to that dropdown and expecting my client to choose the appropriate email tied to the customer. As you can imagine, not very smart but I was trying to bang something out that would hold me up for a week while I developed this app further. Also, I pointed to that other thread because it contained a similar problem I was encountering. In retrospect, I should have started a **new** thread on that post instead of posting to Solved. Another learned moment. And just yesterday, I understood why my code in that other thread wasn’t working. Thanks again for your initiative. The PW community is great.
  13. I decided to take a different approach which kind of eludes to what you’re saying. I’ve split up my Form Builder form into two different pages. I'm passing the page reference ID to the second page. I’m not using a hook per se, but here’s where I’m stuck and once I have the answer then it’s smooth sailing. Perhaps you can answer:
  14. Yes, I know the value isn't visible to the user; I had my web dev inspector open and saw your code does exactly what I asked. The values _are_ being correctly assigned to the value attributes of the menu. Nothing wrong with your code and it’s much appreciated. But it’s my fault that I assumed saving would work without a hitch within Form Builder. Especially since the select menus are populated just perfect. The problem is that Form Builder’s seems to be stripping the values upon saving it to a PW page. Which tells me that I need to utilize a variation of your code _within_ Form Builder’s hook system. Otherwise it disregards certain things. Sort of like pre-populating fields needs to be done a “Form Builder way.” Direct Message me and I’ll drop a little something your way for your time.
  15. @gebeer That code works perfectly!… Unfortunately, I’m using that field within a Form Builder form. So after the Form Builder module saves the form to a Processwire page, it sends an empty value. On the form page itself, though, the select menu properly sees the code you supplied and the values in the select menu do show up properly.
  16. I created a select field that uses Page Reference. Works fine. But I don’t retrieve (and store) the ID of the referenced page, I want to use another field in that looked-up record as the value of my select/dropdown. Page Name: Temp Order Page Name URL: temp-order Field I want to grab: email PW makes it easy to assign multiple fields to comprise the ***label*** for that dropdown/select, but the ***value*** itself of the field is naturally hardwired to the page ID. That I understand. But how can Page Reference be used beyond retrieving an ID? And can that be done within the Selector String field in the Input settings for that field?
  17. Does this solution require JS code or php code anywhere, other than the simple instruction you provided for code in the Selector String field?
  18. @cstevensjr My bad. I thought I had the ProcessWireUpgrade module installed. PW has one called SystemUpdater which I thought was the same thing. Kind of confusing. I’ll hold off installing it since I see the ProcessWireUpgrade module page recommends manually updating 3.x. Are you running 3.0.29 and does the module work fine?
  19. I downloaded the zip file direct from Github. @ryan is the module that updates PW simply for stable releases?
  20. I bet your latest push will fix that for Joss. Thanks for the awesome work Ryan.
  21. @adrian Thanks. I'll post additional info there.
×
×
  • Create New...