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