# OnInputFieldCommandUpdated

<table data-full-width="false"><thead><tr><th width="254">Parameters</th><th></th></tr></thead><tbody><tr><td>string</td><td>The string value of the potential command.</td></tr><tr><td>string</td><td>The string value of the message.</td></tr></tbody></table>

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```csharp
using UnityEngine;
using TankAndHealerStudioAssets;

public class ChatBoxExample : MonoBehaviour
{
	// BE SURE TO ASSIGN THIS IN THE INSPECTOR //
	public UltimateChatBox chatBox;


	void Start ()
	{
		chatBox.OnInputFieldCommandUpdated += ( command, message ) =>
		{
			print( $"Potential Command: {command} with message: {message}." );
		};

		// OR //

		chatBox.OnInputFieldCommandUpdated += OnInputFieldCommandUpdated;
	}

	void OnInputFieldCommandUpdated ( string command, string message )
	{
		print( $"This also works! Potential Command: {command} with message: {message}." );
	}
}
```

{% endcode %}
