Jump to content

How to use InputfieldTextTags in module


Recommended Posts

I'm using a form on my module (admin) page, where i'd like to have a field where the admin can select names of users with a specific role. I tried using InputfieldTextTags, and its a functioning inputfield, but it's not returning results. On my users page, i've added a field 'user_full_name'. Here's the relevant code:

// testing InputfieldTextTags 
        $inputSName = $this->modules->get('InputfieldTextTags');
        $inputSName->label = 'Select user names';
        $inputSName->flags = 0;
        $inputSName->type = "FieldtypePage";
        $inputSName->derefAsPage = 0;
        $inputSName->distinctAutojoin = true;
        $inputSName->allowUserTags = "0";
        $inputSName->maxItems = 0;
        $inputSName->parent_id = '/processwire/access/users/';
        $inputSName->labelFieldName = 'user_full_name';
         $inputSName->description = 'just a description';
        $inputSName->name = 'user_names';
        $fieldset->add($inputSName);
// end test

Anything to make this work? 

 

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