Setting SSO login screen default field values

It is possible to set a default value for the username field using javascript

Step-by-step guide

  1. Include the following line in the template configuration file custom/templates/template_name.properties

    javascript = /resource/script/ui-extension.js
  2. Create ui-extension.js in custom/resources/script directory containing

    $(document).ready(function() {
    
    	// Example: If the username field is blank, replace it with +358 and set focus 
    
    	if ( $('input#username').val() == "" ) {
    		$('input#username').val('+358');
    		$('input#username').focus();
    	}
    
    }
  3. Add reference to ui-extension.js in custom/resources.index
  4. Add template name to agent being used

     
jquery is currently included by default as it is used by the default pages