Jump to content

Recommended Posts

Posted

Hi everyone,

I'm trying to build an Inputfield module to provide an alternate interface for creating multiple page references. I'm trying to access the "Selectable Pages" settings for the current field within my module. Does anyone know how to access those settings using the PW API?

I'm specifically looking for:

- Parent of Selectable Pages

- Template of Selectable Pages

- Custom Selector 

- Custom PHP code to find selectable pages

These settings are found in Setup -> Fields -> (fieldname) under the Input tab.

Really appreciate any insight anyone might have...

Thanks,

-Brent

Posted

Well, as usual,  that was easier than I thought. In case others overlook the same thing, I was able to access those settings with the following:

$field = wire('fields')->get($this->name);

$template = $field->template_id;
$parent = $field->parent_id;
$selector = $field->findPagesSelector;
$code = $field->findPagesCode;
  • Like 2

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...