-
Notifications
You must be signed in to change notification settings - Fork 1
Code Reference
Manages form submission and is intended to contain the form elements.
Calls the submit()
function when pressed.
protocol
: Protocol
Handles the submission of the form.
Connects the submit_button
's pressed
signal to the submit
method if submit_button
is not null.
Submits the form data to the protocol.
-> Dictionary
Generates a dictionary of the form data.
subject
: Node
= self
The node to generate the dictionary from.
This is mainly used for recursion.
-> bool
Returns whether the given node is an input.
Inputs are:
- buttons except MenuButton
- LineEdit
- TextEdit
- ItemList
- Slider
- SpinBox
- GraphEdit
-
subject
:Node
LineEdit with a [validator].
Assigns the style from the [validator] if it exists.
TextEdit with a [validator].
Assigns the style from the [validator] if it exists.
Handles form submission and response.
-> int
Submits form data and returns HTTP status code of the response.
-
fields
:Dictionary
The output ofFormContainer.generate_fields_dict
-> Variant
Finds the value of the given Node based on its type.
Throws an error if the type is unknown.
BaseButton
-> button_pressed
: bool
LineEdit
| TextEdit
-> text
: String
Slider
| SpinBox
-> value
: float
GraphEdit
-> get_connection_list()
: Array[Dictionary]
ItemList
-> items
:
Array[{
selected = is_selected(): bool,
text = get_item_text(): String,
icon = get_item_icon(): Texture,
metadata = get_item_metadata(): Variant
}]
Validates Text Input according to rules about length and content.
A collection of predefined regular expression patterns.
Items correspond to the PredefinedRegex
Input must have a value.
[min_length
] will be adjusted if needed.
temporary storage of min_length used by the setter of required
Minimum length of the input.
Minimum and Maximum number of matches for \w+ allowed
List of allowed strings.
List of prohibited strings.
- NONE
- ALPHABETICAL
- NUMERICAL
- ALPHANUMERICAL
- EMAIL_ADDRESS
- PHONE_NUMBER
Predefined pattern to match against.
- MUST_MATCH_BOTH
Input must match both the predefined and the custom regex (if both are set) - CAN_MATCH_EITHER
Input can match either the predefined or the custom regex (if at least one is set)
How predefined and custom regexes are checked against in relation to each other.
Custom Pattern to match against.
Normalise the case before matching.
Don't allow any more than one match.
-> void
Compiles the custom regex
-> void
Validates given text and updates valid property.
-
new_text
:String
New content of the input
-> bool
Validates given text against all rules and returns validity
-
subject
:String
Text to validate
An upper and lower bound of an integer value.
Lower bound
Upper bound
-> bool
Determines if the subject is within the boundaries.
-
subject
:int
A filter with a blacklist or whitelist of strings
- ALL
All elements must be present - AT_LEAST_ONE
At least one element must be present
Match requirement
The blacklist or whitelist
-> bool
Returns wether the subject is represented in the list
-
subject
:String
-> int
Returns the output of elements.size()
NetworkProtocol
: Protocol
Handles form submission and response over the network.
Target hostname
Target port -1 means "use default port"
Use authentication for target
Username at target
Password at target
Path to private key file
-> void
Tries to set host_username
based on environment var, if not already seties to set host_username based on environment var, if not already set
HttpProtocol
: NetworkProtocol
Handles form submission and response over the network using HyperText Transfer Protocol
Web export is not supported.
Based on tutorial Godot Docs > Tutorials > Networking > HTTP Client Class
Use HTTPS
Target path
- GET
- HEAD
- POST
- PUT
- DELETE
- OPTIONS
- TRACE
- CONNECT
- PATCH
HTTP Method
HTTP Headers
HTTP Client
{protocol}://{host}
-
code
:int
HTTP Status Code -
headers
:Dictionary
-
body
:PackedByteArray
-> void
Sets the port to 443 if encrypt
is true, otherwise 80, if it is set to -1.
Submits form data and returns HTTP status code of the response.
Web export is not supported.
-
fields
:Dictionary
-> String
Returns a string representation of the HTTPClient.STATUS_. or "Status: {status}" if the status is not one of the following:
2. Error resolving host {host}
4. Error connecting to host {host}:{port}
8. Error in HTTP connection
9. Error in TLS handshake
-
status
:int
Status returned by HTTPClient.get_status()
MailProtocol
: NetworkProtocol
Handles form submission and response over the network using E-Mail.
- HTML
Stylable HyperText Markup Language Form with disabled inputs - PLAIN_TEXT
{key}: {value} - JSON
JavaScript Object Notation
Path to CSS file to use for styling regardless of body_format
Sender name
Sender address
Recipient address
Subject line
-> int
Submits form data in an E-Mail to the recipient and returns HTTP status code of the response.
-
fields
:Dictionary
-> String
Generates the body for the E-Mail
-
fields
:Dictionary
Output of FormContainer.generate_fields_dict() to populate body
-> String
Converts a type to a string for use in HTML form.
TYPE_STRING -> "text"
TYPE_BOOL -> "checkbox"
TYPE_INT -> "number"
TYPE_FLOAT -> "number"
TYPE_ARRAY -> "select"
TYPE_NIL -> "text"
-
type
:int
Output of typeof()
-> String
Returns the value of a node as a string for use in the E-Mail body.