Jump to content

list input type


lsag
 Share

Recommended Posts

No necessity for a module in this case. Use field type "Page" instead.

In your tree in the ProcessWire admin, add a (hidden, if you want) page called, for example "Currencies". Afterwards add children to them: e.g. USD, EUR, GBP.

Next step: create a field of type "Page" (this will reference pages), limit it to a single value ("Details" tab in the fields properties). On tab "Input", set the "Parent of selectable pages" to the aforementioned, newly created "Currencies" site.

Now you got the functionality you're aiming for. This "page field" can now be assigned to another template.

Advantage of this approach: When you need to add options (a new currency) to your set of currencies, you can just add a page and all the "page field selects" implemented elsewhere will notice that there's a new option.

If this description is too quick and shallow, just give a notice. 

This whole approach is one of ProcessWire's strength and I'd be happy to explain it in more detail :)

Edited by marcus
  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

×
×
  • Create New...