Jump to content

Search the Community

Showing results for tags 'inputfieldpagelistselectmultiple'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I am trying to create an input field type InputfieldPageListSelectMultiple in a module, but for some reason, it doesn't quite work as expected... (abbreviated) code: $this->addHookAfter('ProcessPageLister::renderResults', function ($event) { $out = ''; if(wire('page')->id === 1224) { // the particular Lister instance page id $form = wire('modules')->get("InputfieldForm"); $field = wire('modules')->get("InputfieldPageListSelectMultiple"); $field->attr('name+id', 'current_selection'); $field->attr('class', 'InputfieldAsmSelect'); $field->label = 'Your current selection'; $field->derefAsPage = FieldtypePage::derefAsPageOrNullPage; // this part works - $total is taken from a session variable if($total) { $sel = $total["selector"]; $myPages = wire('pages')->findIDs($sel); foreach($myPages as $k=>$v) { $field->attr('value', $v, wire('pages')->get($v)->title); } } $form->append($field); $myForm = $form->render(); $event->return = $myForm; } }); What I get is this: I can't drag and drop, the layout is not correct (trashcan should be on the right), and I also can't delete. Furthermore, I see a textinput with the page IDs underneath. Why? Oh, and also: the first item is "Label" o_O I've googled, and looked at Ryan's code, but I guess I'm missing important stuff. (if you're wondering: I'm trying to do a little proof of concept that would (partly) solve this question here)
×
×
  • Create New...