Jump to content

Recommended Posts

Posted

Custom PHP code is available for use in PageReference field type. Is it possible to use custom php to generate the values for a Select Options FieldType?? 

What I'm to trying to achieve is to generate values for a options field from values for repeater in a grand parent's page (parent of parent page).

Posted
7 minutes ago, Sérgio Jardim said:

Oh yeah! See:

 

That post was NOT for modifying the field options but to save an options selected in his form. Probably front-end stuff.

What I'm looking for is a solution to the backend to dynamically set/modify selectable options based on field values from grand-parent page.

I came across something close. https://github.com/BitPoet/FieldtypeDropdownDynamic

But it has not been updated for 2 years and my lack of ProcessWire knowledge is keeping me from updating it.

Coming from the WordPress world, PW is very different (in both good/bad ways). In WP we store custom field configurations in php, but here its stored in DB tables.

Posted

@waheed, Repeater items are pages so what you want is a Page Reference field. Set the selectable pages to the value of the Repeater field (which is a PageArray).

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
×
×
  • Create New...