> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/de/powershell-befehle/new-udtextbox.md).

# New-UDTextbox

### Übersicht

Textfelder ermöglichen Benutzern das Eingeben und Bearbeiten von Text.

### Syntax

```powershell
New-UDTextbox [[-Id] <String>] [[-Label] <String>] [[-Placeholder] <String>] [[-Value] <String>] [[-Type] <String>] [-Disabled] [[-Icon] <Object>] [-Autofocus] [-Multiline] [[-Rows] <Int32>] [[-RowsMax] <Int32>] [-FullWidth] [[-Variant] <String>] [[-ClassName] <String>] [[-OnEnter] <Endpoint>] [[-OnBlur] <Endpoint>] [-Shrink] [[-OnValidate] <Endpoint>] [[-HelperText] <String>] [[-OnChange] <Endpoint>] [[-Minimum] <Int32>] [[-Maximum] <Int32>] [[-MaximumLength] <Int32>] [[-Sx] <Hashtable>] [[-Style] <Hashtable>] [[-MaskPattern] <String>] [[-Attributes] <Hashtable>] [<CommonParameters>]
```

### Beschreibung

Erstellt ein Textfeld. Textfelder können eigenständig oder innerhalb eines New-UDForm verwendet werden.

### Parameter

#### -Id

Die ID der Komponente. Standardmäßig eine zufällige GUID.

```
Required?                    false
Position?                    1
Default value                ([Guid]::NewGuid())
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Label

Eine Beschriftung, die über diesem Textfeld angezeigt wird.

```
Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Placeholder

Ein Platzhalter, der im Textfeld angezeigt wird.

```
Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Value

Der aktuelle Wert des Textfelds.

```
Required?                    false
Position?                    4
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Type

Der Typ des Textfelds. Dies können Werte wie text, password oder email sein.

```
Required?                    false
Position?                    5
Default value                text
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -Disabled [<SwitchParameter>]
        Whether this textbox is disabled.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Icon Das Symbol, das neben dem Textfeld angezeigt wird. Verwenden Sie New-UDIcon, um ein Symbol zu erstellen.Required?                    falsePosition?                    6Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -Autofocus \[\<SwitchParameter>]        Whether to autofocus this textbox.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -Multiline \[\<SwitchParameter>]        Creates a multiline textboxRequired?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-RowsDie Anzahl der Zeilen in einem mehrzeiligen Textfeld.Required?                    falsePosition?                    7Default value                -1Accept pipeline input?       falseAliasesAccept wildcard characters?  false-RowsMaxDie maximale Anzahl der Zeilen in einem mehrzeiligen Textfeld.Required?                    falsePosition?                    8Default value                9999Accept pipeline input?       falseAliasesAccept wildcard characters?  false    -FullWidth \[\<SwitchParameter>]        Whether to make this textbox take up the full width of the parent control.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-VariantDie Variante des Textfelds. Gültige Werte sind "filled", "outlined", "standard"Required?                    falsePosition?                    9Default value                standardAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ClassNameEine CSS-Klasse, die auf das Textfeld angewendet wird.Required?                    falsePosition?                    10Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnEnterEin Skriptblock, der aufgerufen wird, wenn der Benutzer die Eingabetaste drückt. Die Variable $EventData enthält den aktuellen Wert des Textfelds.Required?                    falsePosition?                    11Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnBlurEin Skriptblock, der aufgerufen wird, wenn der Benutzer das Textfeld verlässt. Die Variable $EventData enthält den aktuellen Wert des Textfelds.Required?                    falsePosition?                    12Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -Shrink \[\<SwitchParameter>]        Whether to shrink label by default.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnValidateEin Skriptblock, der aufgerufen wird, wenn der Benutzer das Textfeld verlässt. Die Variable $EventData enthält den aktuellen Wert des Textfelds. Wenn der Skriptblock ein Validierungsergebnis zurückgibt, das ungültig ist, wird es unterhalb des Textfelds angezeigt.Required?                    falsePosition?                    13Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-HelperTextEin Hilfetext, der unterhalb des Textfelds angezeigt wird.Required?                    falsePosition?                    14Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnChangeEin Skriptblock, der aufgerufen wird, wenn der Benutzer den Wert des Textfelds ändert. Die Variable $EventData enthält den aktuellen Wert des Textfelds.Required?                    falsePosition?                    15Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-MinimumDer Mindestwert für ein Zahlen-Textfeld.Required?                    falsePosition?                    16Default value                0Accept pipeline input?       falseAliasesAccept wildcard characters?  false-MaximumDer Maximalwert für ein Zahlen-Textfeld.Required?                    falsePosition?                    17Default value                0Accept pipeline input?       falseAliasesAccept wildcard characters?  false-MaximumLengthDie maximale Länge des Texts im Textfeld.Required?                    falsePosition?                    18Default value                0Accept pipeline input?       falseAliasesAccept wildcard characters?  false-SxEine Hashtable mit themenbasierten Eigenschaften, die auf das Textfeld angewendet werden.Required?                    falsePosition?                    19Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-StyleEine Hashtable mit CSS-Eigenschaften, die auf das Textfeld angewendet werden.Required?                    falsePosition?                    20Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-MaskPatternEin Maskenmuster, das auf das Textfeld angewendet wird. Dies wird für Eingabemasken verwendet. Weitere Informationen finden Sie unter iMaskjs.Required?                    falsePosition?                    21Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-AttributesRequired?                    falsePosition?                    22Default value                @{}Accept pipeline input?       falseAliasesAccept wildcard characters?  false    \<CommonParameters>        This cmdlet supports the common parameters: Verbose, Debug,        ErrorAction, ErrorVariable, WarningAction, WarningVariable,        OutBuffer, PipelineVariable, and OutVariable. For more information, see        about\_CommonParameters (<https://go.microsoft.com/fwlink/?LinkID=113216).Ausgaben--------------------------> BEISPIEL 1 --------------------------PS >New-UDTextbox -Id 'textbox1' -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe'Basic textbox|Creates a basic textbox.-------------------------- EXAMPLE 2 --------------------------PS >New-UDTextbox -Id 'textbox2' -Label 'Password' -Placeholder 'Enter your password' -Type 'password'Password textbox|Creates a password textbox.-------------------------- EXAMPLE 3 --------------------------PS >New-UDTextbox -Id 'textbox3' -Label 'Email' -Placeholder 'Enter your email' -Type 'email'Email textbox|Creates an email textbox.-------------------------- EXAMPLE 4 --------------------------PS >New-UDTextbox -Id 'textbox4' -Disabled -Label 'Disabled' -Placeholder 'Enter your name' -Value 'John Doe'Disabled textbox|Creates a disabled textbox.-------------------------- EXAMPLE 5 --------------------------PS >New-UDTextbox -Id 'textbox5' -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe' -Icon (New-UDIcon -Icon 'User')Textbox with icon|Creates a textbox with an icon.-------------------------- EXAMPLE 6 --------------------------PS >New-UDTextbox -Id 'textbox6' -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe' -AutofocusAutofocus textbox|Creates a textbox that will autofocus when the page loads.-------------------------- EXAMPLE 7 --------------------------PS >New-UDTextbox -Id 'textbox7' -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe' -MultilineMultiline textbox|Creates a multiline textbox.-------------------------- EXAMPLE 8 --------------------------PS >New-UDTextbox -Id 'textbox8' -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe' -Multiline -Rows 5 -RowsMax 10Multiline textbox with 5 rows|Creates a multiline textbox with 5 rows.-------------------------- EXAMPLE 9 --------------------------PS >New-UDTextbox -Id 'textbox9' -Variant 'filled' -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe'Variant|Creates a filled textbox.-------------------------- EXAMPLE 10 --------------------------PS >New-UDTextbox -Id 'textbox10' -OnEnter {PS >    Show-UDToast -Message "You pressed enter!"PS > } -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe'OnEnter|Creates a textbox with an OnEnter event.-------------------------- EXAMPLE 11 --------------------------PS >New-UDTextbox -Id 'textbox11' -OnBlur {PS >    Show-UDToast -Message "You left the textbox!"PS > } -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe'OnBlur|Creates a textbox with an OnBlur event.-------------------------- EXAMPLE 12 --------------------------PS >New-UDTextbox -Id 'textbox12' -OnValidate {PS >    if ($EventData -eq 'John Doe') {PS >        return New-UDValidationResult -ValidPS >    }PS >    else {PS >        return New-UDValidationResult -ValidationError "You must enter John Doe"PS >    }PS > } -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe'OnValidate|Creates a textbox with an OnValidate event.-------------------------- EXAMPLE 13 --------------------------PS >New-UDTextbox -Id 'textbox13' -HelperText 'This is a helper text' -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe'Helper Text|Creates a textbox with helper text.-------------------------- EXAMPLE 14 --------------------------PS >New-UDTextbox -Id 'textbox14' -OnChange {PS >    Show-UDToast -Message $EventDataPS > } -Label 'Name' -Placeholder 'Enter your name' -Value 'John Doe'OnChange|Creates a textbox with an OnChange event.-------------------------- EXAMPLE 15 --------------------------PS >New-UDTextbox -Id 'textbox15' -Type 'number' -Minimum 1 -Maximum 100Minimum and Maximum|Creates a number textbox with a minimum and maximum value.-------------------------- EXAMPLE 16 --------------------------PS >New-UDTextbox -Id 'textbox16' -MaskPattern '+7 (000) 000-00-00'Mask Pattern|Creates a textbox with a mask pattern.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/de/powershell-befehle/new-udtextbox.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
