How to collect and different information such as passwords and usernames from one inputField?

Hey guys,
What I am trying to do is to have one inputField that collects different information., how would I go about doing this?
Example something like a Linux terminal or windows command pump where it only has one inputfield but it ask you to provide different information?

Cheers in advance

You can add the onEndEdit listener so as to change the behaviour of your input field :

public InputField inputField;
private string username ;
private string password;

void Start()
{
     SelectNameInput();
}

public void SelectNameInput()
{
     inputField.onEndEdit.RemoveListener( OnPasswordValidated ) ;
     inputField.onEndEdit.RemoveListener( OnUsernameValidated   ) ;
     inputField.onEndEdit.AddListener( OnUsernameValidated   ) ;
     inputField.contentType = UnityEngine.UI.InputField.ContentType.Standard;
}

public void SelectPasswordInput()
{
     inputField.onEndEdit.RemoveListener( OnPasswordValidated ) ;
     inputField.onEndEdit.RemoveListener( OnUsernameValidated   ) ;
     inputField.onEndEdit.AddListener( OnPasswordValidated   ) ;
     inputField.contentType = UnityEngine.UI.InputField.ContentType.Password ;
}

void OnUsernameValidated( string value )
{
     if( !CheckUsername( value ) )
          return ;

     username = value ;
     SelectPasswordInput();
}

void OnPasswordValidated ( string value )
{
     if( !CheckPassword( value ) )
          return ;

     password = value ;
     SelectNameInput();
}

bool CheckUsername( string value )
{
	bool valid = true ;
	
    // Make checks on user name like length, only letters....
    
	if( valid )
	{
		// Show success message
	}
	else
	{
		// Show error message
	}
	
	return valid ;
}

bool CheckPassword( string value )
{
	bool valid = true ;
	
    // Make checks on password like minimum size, numbers, ....
	
	if( valid )
	{
		// Show success message
	}
	else
	{
		// Show error message
	}
	
	return valid ;
}

Changing the input type when ending the edit may not be the best idea since the event can be fired when the input looses the focus.