/Godot-Form

Godot 4 User Input Form Addon

Primary LanguageGDScriptMIT LicenseMIT

Icon
Godot Form Plugin

Example

In the Editor

This is how a form might look in the editor:
Form in the editor

In Action

This is how the form might look in the game:
Form in action

Requirements

  • Godot 4.1 or higher

Godot 4.0 might work, but is not tested.

Quick Start

Get a form up and running in 11 steps.

Installing the plugin

  1. Install the plugin from the Asset Library tab in Godot or from the Asset Library Page or by following the Installation instructions. When the following prompt comes up, select only the "addons" folder:
    Download only the addons folder
  2. Enable the plugin in the Project Settings:
    Enable the plugin

Creating the structure

  1. Add a Form to your scene.
  2. Add a Container of your choice as a child of the Form to hold the form elements.
  3. For each form element, add a FormLabel and any input Control.
  4. Finally, add a Submit button.

Hooking everything up

  1. In the inspector of your Form, set the Submit Button property to your Submit button.
  2. In the inspector of each element, set the input property to the corresponding Control node.

Configuring the form

  1. In the inspector of your Form, choose and set up a Protocol. Currently supported protocols are: - HttpProtocol - MailsendSmtPMailProtocol - FileProtocol

Of course, you can also implement your own protocol by extending the Protocol class or any of its descendants.

  1. In the inspector of each FormLabel, set the input_required property if needed.
  2. In the inspector of each input Control, set and configure the Validator property with rules.

More info in the Wiki