Jump to content

Pete

Administrators
  • Posts

    3,941
  • Joined

  • Last visited

  • Days Won

    59

Pete last won the day on June 7 2021

Pete had the most liked content!

3 Followers

About Pete

  • Birthday October 4

Profile Information

  • Gender
    Male
  • Location
    Buckley, Wales

Recent Profile Visitors

39,812 profile views

Pete's Achievements

Hero Member

Hero Member (6/6)

3.8k

Reputation

24

Community Answers

  1. Thank you - I think when I last tried it both selects were in a combo field (Pro module) so may not work there but might with this update - I'll check.
  2. Can you remind me how dependent select fields work?
  3. Thanks guys will take a look at these 🙂
  4. Hi all, I've got a custom backend page add/edit modal and can hide the tabs I don't want on the page that opens in the modal easily enough, but is there an easy way to hide the "Save and Keep Unpublished" button and perhaps rename "Publish" as "Save"? I'm pretty sure I'll need a hook but not sure where to look.
  5. For anyone who comes across this topic, I'd done a Wordpress import and was storing the original filename in an extra field in my photos field, so my code to rename after I botched the names up the first time was: foreach ($page->photos as $photo) { $photo->rename($photo->wordpress_filename); } $page->save('photos'); I suspect that you can do this too if you have a separate array of old and new names - not tested but it is the same idea as above done a different way by getting the file by current name first, then renaming it: foreach ($renameArr as $old => $new) { $page->photos->getFile($old)->rename($new); } $page->save('photos'); The act of simply saving the relevant field after the renaming updates the database nicely whereas looking at the previous comments this wasn't always the case.
  6. @ryan I can confirm this on latest PW dev - having "tags" on an images field with extra custom fields, then removing tags from that field, then trying to upload images shows this error. For now I just re-enabled tags on that field.
  7. I think I've actually already spotted some workflow flaws that mean I couldn't use it for this project actually, but the offer of access/managing the repo still stands.
  8. @MarkE I may finally be using this module on a project many years after last being involved with it. Did you want access to the main repo to merge your changes into it? My needs may be somewhat different - updating a trip diary (single page, many entries) over the course of a trip - so I'd likely be using a modified version anyway but whilst I'm looking back at this topic I thought I'd ask 🙂
  9. Aha, I managed to get this to happen again. Step 1: delete two PageAutoComplete entries and save the page - the empty rows remain (I really wish empty rows wouldn't get saved but that's another story): Step 2: Typing into the fields in the two existing empty rows you can enter the same value twice (so below I just entered the Parkland Resort extra into the first of the two empty rows, and am able to add it again in the second of the empty rows) It respects the once-per-table setting when you add a new row, but not for empty existing rows. I do wonder if another belt-and-braces solution here is to simply check for and delete duplicate rows on save too?
  10. Okay so I resolved this by chance - it won't work in PageAutocomplete UNLESS you give it a "normal" field as an alternative, so here is what you need in the config for that field in the table: labelField=myFooLabel|title I suspect what is happening is the AJAX request doesn't know what myFooLabel is for some part of the request but this makes the items appear in the list using myFooLabel which was a nice surprise! Not really sure why it makes it work, just guessing above but it does work and that's the main thing 🙂
  11. You're right, it is working. I think I fell foul of having changed the table schema and sometimes it can get itself a bit mixed up. When I stripped out some extra settings from when my first column was a different fieldtype and re-saved it started behaving itself just fine. Thanks for checking!
  12. That's great, thank you 🙂 The only tiny thing missing is being able to change the "replace image" label, but only because I changed the other labels to say "photo". I feel like I'm being picky now.
  13. This is a great approach, thanks @bernhard One place it doesn't work, and I don't know why, is using it as a labelField in a Profields Table using PageAutocomplete. When you select something and save it works fine, but the list of suggestions returned is blank. What I mean is this - there's a result for those 4 letters, but using this hook it doesn't display. As you can see from the Everest row though, I've used it to stitch the page title and a price field together so when you select the blank item from the list it's selected, but the label doesn't appear until the page is saved. If anyone smarter than me can figure out how to get it to work with PageAutocomplete in a Profields Table you would be my hero 🙂
×
×
  • Create New...