Jump to content

let editor add options to a select options fieldtype


processwireNewbie
 Share

Recommended Posts

Hi guys,

i am sorry if this is a noob question but i am new to this and have been struggling for 2 days now and would really appriciate any help.

i have a couple of fields that are select options, and i've inserted couple of options inside with this structure:

1=option one

2=option two

My problem is in that a person that's gonna insert content has to have a way of adding or deleting these options, but ofcourse i dont want to give superuser rights to this person.

I've created a specific role for this person but i cannot give access for changing fields ( i guess that is by design) , so i wanted to create a new tab  for this role like on the picture.

I've managed to insert a tab there but i want to create a custom page here in which i would offer possibility for adding and deleting options ( i know how to do this part i just dont know how to create a page here inside this admin template for specific user role that isnt superuser).

Can someone please navigate me in some direction because i am really lost. Thanks in advance and happy new year.

Screenshot 2018-12-31 at 18.27.06.png

Link to comment
Share on other sites

The best way to allow for editors to add options is to use a Page Reference field instead of a Select Options field. Page Reference fields are much more flexible than Select Options fields and are the better choice in all but the most simple scenarios.

I like to create the option pages for my Page Reference fields under a parent called "Selects" at the top level of the tree.

2019-01-01_074218.png.bd469cdf104db2f1b0b69ba46cae6fbe.png

If you configure the allowed parent and child template settings for the parent and option templates (e.g. colours and colour in the screenshot above) then it's really easy for your editors to add new option pages.

2019-01-01_074252.png.2cd18b4316c3baeb52af0761289441f8.png

Some useful modules to check out:

Page Field Select Creator - handy to quickly set up a Page Reference field and its options

Page Field Edit Links - allows editors to create new option pages directly from the field (or you can use the similar but more basic core feature for some Page Reference inputfield types)

  • Like 4
Link to comment
Share on other sites

Thank you so much. took me 15 minutes to set it up. Awesome!

took me another 15 minutes to try to figure out what does Page Field Edit Links  this do, i tried installing and uninstalling couple of times to try to spot what is this new feature but i could not figure it out. i am sorry for asking this dumb question but could you screenshot me maybe what does this module do exactly?

 

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
 Share

  • Recently Browsing   0 members

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