Customizing the Placeholder on the Server 2012R2 ADFS(ADFS 3.0) Login Page

If you have looked at the new ADFS 3.0 login screen you will have noticed that it is using the HTML 5 placeholder value to store an example of a log on.  Unfortunately in my case our users log on IDs don’t correspond with their email address.  This may cause some confusion with end users when prompted by that screen.  It is possible to change the default values by making use of the onload.js of a custom theme.  Here are the steps to do so.(Note: This will make the placeholder blank in all versions of IE prior to 10)

  1.  Log on to your adfs server and create a custom theme:
    New-AdfsWebTheme –Name custom –SourceName default
  2. Export the theme:
    Export-AdfsWebTheme –Name custom –DirectoryPath c:\theme
  3. Edit the onload.js file located in the c:\theme\script folder.  Add the following:

    // Check whether the userNameInput element is present on this page.
    var userNameInput = document.getElementById('userNameInput');
    if (userNameInput)
    // userNameInput element is present, modify its properties.
    userNameInput.placeholder = 'Placeholder Text';
  4. Replace the onload.js in your custom theme with the new onload.js

    Set-AdfsWebTheme -TargetName custom -AdditionalFileResource   '   @{Uri=’adfs/portal/script/onload.js’;path="c:\theme\script\onload.js"}
  5. Set the custom theme as your active theme.
    Set-AdfsWebConfig -ActiveThemeName custom


The theme should now have your custom placeholder.
Sign In


3 thoughts on “Customizing the Placeholder on the Server 2012R2 ADFS(ADFS 3.0) Login Page

  1. This works great but I’m not getting a blank entry on IE 9. IE 10, Firefox, etc work as expected with my text showing. If I could get IE 9 to just go blank that would make this work for me. It’s still showing Any ideas?

  2. Hey Jason, I just tried to run through your method for changing placeholder text in adfs but when I try to do step 4 I just get a new line in powershell with >> and I can’t seem to escape this. Any advice on this?


    • Hi Dave, there is an apostrophe in the middle of that code that needs to be removed

      Set-AdfsWebTheme -TargetName custom -AdditionalFileResource @{Uri=’adfs/portal/script/onload.js’;path=”c:\theme\script\onload.js”}

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s