Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by cst989

  1. I didn't get as far as checking if a table field would save the rows when they were new, because unfortunately table doesn't offer as many options that I needed, like a default option on selector, or the ability to show/hide fields I ended up sticking with the repeater matrix but forcing the repeater to publish on save. I tried the following, it worked at first but then it started creating database errors.... $this->addHookAfter("Pages::saveReady", function (HookEvent $event) { $page = $event->arguments("page"); if(!($page->hasField("featured_articles"))) return; foreach($page->featured_articles as $item) { $item->of(false); $item->status("published"); $item->save(); } }); now I think I'm just going to create 5 separate fields of "fieldset (page)" type 😕
  2. Wow its funny you added this... I created something just a few months ago using CSS to achieve this... wish I'd waited! Mine...
  3. Unfortunately the module doesn't seem to work at all for me. Also none of the theme options seem to change anything. Perhaps it's using it inside a RepeaterMatrix field that's the problem? This is PW 3.0.184. Also the above post about performance is a bit disconcerting but I've not gotten far enough to test that It's a shame because it looks perfect for what I needed otherwise. Including ionicons was a great choice.
  4. That looks great! If "show all rows" is selected, and you open and save a fresh page with that field, does it actually save rows for you to iterate through? Per my issue at the end of my first post -- it caused me some issues with repeater
  5. You know what, I have a long expired subscription for ProFields and I have been weighing up whether or not I need to renew 😄 I will take a look, thanks
  6. Hi, I'm using a repeater in the following manner: I have set the minimum items to 5, and the maximum number of items to 5. I basically just want to loop through a few fields five times. But I feel like I'm really forcing the repeater to do something it's not really meant for by doing this. A table would look and feel better, but as far as I know can't be fixed to x rows/pre-populated. Also there's a technical problem with this. Repeater rows do not seem to save unless you change something. So if I make a new page with the fields above and hit save, no data is actually available for the field. In my screenshot you can see that items #1 and #5 have saved because the type has been changed to 2 - they're solid and don't say "New" anymore. Also item #4 has saved because the type was changed and changed back. But #2 and #3 won't ever save unless you change the value. If there's not a better suggestion for the approach in general - I would appreciate any technical support in forcing each row to save!
  7. Sorry I should've been clearer, what I was seeing was that the description was still visible, but the padding broke and spacing at the bottom of the fieldset was out of alignment. The way I'm trying to use minimal fieldset is like this: For me, a description would still be kinda handy to have - but I appreciate it would need new CSS logic and that's more complicated than it seems. And I understand if this isn't exactly the aim of the module. 0.1.7 certainly fixes the visual hiccup pictured, so thanks for that 🙂
  8. Just fyi this breaks a bit if you put a description for the fieldset and also tick the box. Maybe just in the latest version of PW
  9. I know this was asked before but I still don't fully understand, why does this module open a popup with a tab where you can select the target, if it doesn't do anything? I handed over a CMS using this field to a third party and they tried to use target="_blank" from the attributes tab of this field all over the site and were surprised when it did nothing. Wouldn't it be better if this module stored an object with these bits in, returning the link by default? Either that or at least drop the attributes tab from the popup if it doesn't do anything.
  10. I hit a back-end error with a default value on this module Basically I set the default opengraph image to an image within a pagereference field, like so: {banner.image} This works fine if it exists, but if it doesn't, it hits a fatal error
  11. Hi Erik, I would try the decimal fieldtype linked to in Robin's post - and also you don't want to be changing it directly in the db, just changing the field type
  12. What would you consider a good, clean way to append a list of pages retrieved randomly, with more random pages (excluding those you've got already)? Eg you start with $pages->find("template=gallery-detail, sort=random, limit=100"); You output this to your template, then you have a "load more" button. This works through ajax. Now within the ajax, you need to select another 100, but exclude those you retrieved the first time. So I'm thinking you need to post all the pages you've got already, or maybe store in a session? And then exclude them from your next find(). But I imagine that would be a bit slow, excluding 100 pages by ID? Is there a more efficient way?
  13. Var dump returns a string but still nothing in the field... It's occurring to me now, maybe I'm misunderstanding this whole thing? Is this actually meant to be populating the html field itself? Will this still work if I'm using embed method C or D on Formbuilder? I'm trying to avoid populating this with javascript but that would be so much easier... perhaps I'll just abandon it.
  14. Hi all, I have a simple issue with inputfield:attr() not setting a value. I'm doing this in ready.php $forms->addHook('FormBuilderProcessor::renderReady', function($e) { $form = $e->arguments(0); if($form->name != 'enquiry_form') return; $inputfield = $form->getChildByName('cart'); if($inputfield) { $cart = json_encode(wire('session')->get('cart')); $inputfield->attr('value', $cart); } }); This is lifted straight from formbuilder hooks and inputfield method specs. If I echo $cart it's definitely a simple string of json, but nothing appears in the cart field (which is a plain text field - later to change to hidden) Is there something obvious I might've overlooked here? As a side question, can anyone think of a better way to do this - add my cart to a Formbuilder submission (it's not a shop, just an enquiry) - while still storing entries easily in the formbuilder entries list.
  15. Thank you, I finally got around to doing this. I was able to combine in || $template->fieldgroup->has('meta_description') as well, and left out the , meta_title='' so you can see them all, empty or otherwise. Only minor oddity remaining is that all the filters generated by this script load in an open position, and you get an odd js glitch when you try to close them the first time - but beggars can't be choosers!
  16. Sorry I should've been clearer. I used the latest version, ie part of Processwire (3.0.1xx) The gifs etc were very big, memory limit was 128M I think. I can't tell you the exact size because I told the person editing the page to make them (much) smaller and reupload. Of course, I can increase the memory and decrease the filesize but the problem was more about being unable to get back into the page without uninstalling the module
  17. In this day and age I feel like the responsive option should be enabled by default! I nearly didn't notice it. How tricky would it be to pass on parameters like ?loop=1 in the URL?
  18. When I enabled this, a page with a rather oversized gif ran out of memory saving, and then proceeded to return a 500 on the front and back-end 🤪
  19. That looks great @Robin S thanks! Would this work with ListerPro as well?
  20. Yeah I absolutely can narrow it down in other ways, its just that if this worked I would have something I could use on any site without modifying the templates checked each time, or having this extra step to check when finishing a site. I build quite a lot of ProcessWire sites so I'm making templates more often than most! I really appreciate the input though, I will make do with what I have for now. Maybe @ryan could weigh in on this one day 🙂
  21. No need to apologise I really appreciate the assistance! Is this still in custom (field=value)? My field exists in about 7/10 templates, when I do meta_title= I get all pages with or without the field.
  22. Hi @dragan thanks for the response, I think I'm misunderstanding or doing it wrong, empty fields are now being excluded. To clarify my field is meta_title - this is what I've done As you can see it matches 14 pages but there should be 16, also the number doesn't change whether using OR or AND
  23. I'd like a bookmark in the admin to a page list of pages that have a "meta title" field, so that you can quickly see which pages need updating. Without just limiting all the templates that have the field, I want something a bit more future-proof. Is this possible? If so how? I don't want to check if its empty or not equal to anything, as it would also serve to review what is there. I have ListerPro as well but can't see how to do it with either.
  24. This seems like one of the nicest, cleanest methods to do this, but for me it doesn't work. I end up on this page instead The Url is /manage/settings but when I click it I'm redirected to /manage/settings/bookmarks What am I doing wrong?
  25. I worked it out while putting the code in this post and trying to remove parts til it works. I had part of my filter like this if(isset($request)) { $filter .= 'price>=".(int) $request['min'].', price<='.(int) $request['max'].', beds>='.(int) $request['beds'].', property_type='.(int) $request['property_type']; } As it turns out, you can't put line breaks in your filter like this! They obviously didn't show up in var_dump or the browser when echoed, so I missed this.
  • Create New...