Set default text of an Input Field

Is there a way to add some default text to an input field in Unity? Not as a placeholder but as text in the textbox , without creating a script. There is a Text object as part of the input field however when I enter text into it, it disappears.

Any help would be appreciated, thanks.

Setting the text value in the nested Text object won’t work, but you can set the value of the Text field in the Input Field script Text field that’s exposed in the editor.

@marty64 that previous answet doesnt work, the value stills erase the value after the app starts, there is no other way to achieve this? i have the same problem

AFAIK, the only way to do this is through script:

create a script and attach it to InputField object and the script will be like this

using UnityEngine;
using UnityEngine.UI;

public class InputFieldScript : MonoBehaviour
    public InputField inputField;

    // Start is called before the first frame update
    void Start()
        inputField = GetComponent<InputField>();
        inputField.text = "Default Value";

another way: could use GameFlow, its a powerful and easy visual scripting tool and free now on the AssetStore

add GameFlow component to InputField object click the + button choose On StartSet Input Field Property