Jump to content

On page edit, select from a dropdown


Recommended Posts

Okay, maybe I'm having one of those moments, but I can't work out how best to do this.

I'm trying to put together a little music composition folio site.

Basically, I have a page "works", using "work" template. That page can have children which use the template "work-entry".

When I create a new work-entry page, apart from entering the usual title, subtitle, body, etc., I would like to have an "instrumentation" field where I can select from a list of instruments.

So, I see there is a "Select Multiple" Inputfield which is descibed: "Select multiple items from a list".

Sounds perfect. But... how to I make the items in that list, and how do I add that list to field? Do I create a whole load of pages (one for each instrument) and then make a a field with "page" as the field type? I don't know, that seems like I'm going down the wrong path...

Any advice? What's the most elegant way of doing this?

Link to comment
Share on other sites

Ah, wait a minute... I think the "Parent of selectable page(s)" was what I was missing. So, I set up a page called "Instruments", and then under that I create child pages named after the instruments... flute, violin, cello, etc.

Am I barking up the wrong tree here, or...?

Link to comment
Share on other sites

It's all kinds of incredible. It's like... everything I can think of, Ryan has thought of it first, and in a brilliant, flexible way. What I'm noticing is that I'll see all these extra options and menus hidden behind collapsed fields and wonder what they are. Then, the next minute you know, it's like... "hey! that's exactly the functionality I'm looking for!".

I mean... I was looking at that input option the other day "Parent of selectable page(s)". Repeating the words in me head, thinking to myself... man, that sounds cryptic. I wonder what that's for. And now today, when I'm trying to get things to work in a certain way, I come across that field again and it all makes perfect sense, perfectly and intuitively laid out. But... and this is the thing that's unique to ProcessWire... not in your face, but there to be easily found when you need it.

I'm finding that to be the learning pattern with ProcessWire... first you have to conceive of the logic order of what it is you want to do, then go discover if there is a built in way of doing it... 9/10 there is!

Much, much respect to the author.

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

And, as I was saying, you go along wondering what a certain ProcessWire option would be useful for, and then one day... boom... it makes sense.


As much as possible I'm trying to do things without installing modules. It's just the way I like to try and set things up initally.

So, I was sitting here trying to work out how best to do tagging. I think doing it by a multiple page select field would be best. But I think to myself... hmm, it would be good if you could actually add a tag from the page edit, rather than on the page tree. And then I recall the option to "Allow new pages to be created from field?". Colour me amazed. Is there nothing Ryan hasn't thought of already!?

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...