Change +People Hint Text

Jump to solution
sciosciap
Community Participant

Hi all,

I was attempting to change the Hint Text that appears when you click +People in the People section. I got this far, but I was unsuccessful:

document.getElementsByID('#user_list_textarea').placeholder='new text for email';

Any suggestions?

1 Solution
shane_ohara
Community Champion

I would recommend that you write it as a function in your custom JS...you just have to update the "var instructionText" and "var placeholderText" to what you want it to display in the pop-up window. This is what we've had in production for over 18 months now:

function _nextButton(e) {

   //alert("click happens - comment that out now");

     var src = e.target || e.srcElement;

   // if there is a click on something and it's the addUsers button and the title of popup is "Add People" THEN DO THE FOLLOWING

     if (src && src.id == "addUsers" && src.getAttribute("title") == "Add People") {

        e.preventDefault();

        var instructionText = "Type or paste a comma separated list of valid usernames (i.e. abc123) or ID # (i.e. 999999999) below:";

        var placeholderText = "Example: 999999991, 999999992, abc123, johndoe, janedoe";

   $('#create-users-step-1 p:first').html(instructionText);

   $('#create-users-step-1 textarea:first').attr('placeholder', placeholderText);

   }

}

// general listener that checks every click and when one is

// detected performs the "_nextButton" function listed above.

document.addEventListener('click', _nextButton);

(code courtesy of mnieckoski​ at Keene State)

Shane

View solution in original post