Search the Community
Showing results for tags 'page select'.
-
Hi all, Before I go potentially wasting time trying to achieve the impossible. Can anyone confirm if its possible to have a Page Reference field on a modules config page? I'm wanting to essentially just output a list of select able pages based on the a given selector (likely by template at this stage), wherein the select is the pages that the module should apply to etc. I was thinking a simple checkbox list would suffice is asmSelect isn't available. Essentially have it display the same way a Page Reference field would display on a template, where you can easily select a bunch of them. public function getInputfields() { $inputfields = parent::getInputfields(); $f = $this->modules->get('InputfieldPage'); $f->attr('name', 'testSelect'); $f->setAttribute('multiple', 'checkboxes'); $f->setAttribute('findPagesSelector', 'template=development'); $f->label = 'Test'; $inputfields->add($f); return $inputfields; } Figured something akin to the above would work but can't seem to get rid of this warning on the modules config screen though.
- 2 replies
-
- page select
- checkbox
-
(and 1 more)
Tagged with:
-
Hi, Using a multiple select page field, there is no way to limit the user to select a set maximum number of pages, is there? For instance, force them to select a maximum of 4 pages from a possible 20 pages when using that field? Short of writing the instructions for them in the field's description, is there some other way? Thanks. Cheers. /k