LaunchBoxCONTRIBUTORS
On this page

14.1 Beta 1 SDK

This reference documents the current beta SDK. Beta APIs can change before stable.

PluginFormField14.1 Beta

C#
public sealed class Unbroken.LaunchBox.Plugins.Forms.PluginFormField : Unbroken.LaunchBox.Plugins.Forms.PluginFormElement
Defines one host-renderable plugin form field.

Inheritance and interfaces

Constructors

PluginFormField 14.1 Beta

C#
public PluginFormField(string id, string label, Unbroken.LaunchBox.Plugins.Forms.PluginFormFieldType type, string? description = null, bool isRequired = false, string? defaultValue = null, System.Collections.Generic.IReadOnlyList<Unbroken.LaunchBox.Plugins.Forms.PluginFormFieldOption>? options = null, System.Uri? helpUri = null, string? helpLabel = null)
Initializes a new instance of the Unbroken.LaunchBox.Plugins.Forms.PluginFormField class.
id 14.1 Beta
The stable form-local field ID used as the submitted dictionary key.
label 14.1 Beta
The literal label used when localization is unavailable.
type 14.1 Beta
The host-renderable field type.
description 14.1 Beta
An optional literal description used when localization is unavailable.
isRequired 14.1 Beta
Whether the plugin requires a submitted value.
defaultValue 14.1 Beta
An optional default value. Secret fields cannot define one.
options 14.1 Beta
The options for a choice field, or null for other field types.
helpUri 14.1 Beta
An optional absolute help URI.
helpLabel 14.1 Beta
The literal help-link label required when helpUri is supplied.

PluginFormField 14.1 Beta

C#
public PluginFormField(string id, Unbroken.LaunchBox.Plugins.PluginText label, Unbroken.LaunchBox.Plugins.Forms.PluginFormFieldType type, Unbroken.LaunchBox.Plugins.PluginText? description = null, bool isRequired = false, string? defaultValue = null, System.Collections.Generic.IReadOnlyList<Unbroken.LaunchBox.Plugins.Forms.PluginFormFieldOption>? options = null, System.Uri? helpUri = null, Unbroken.LaunchBox.Plugins.PluginText? helpLabel = null)
Initializes a field with localizable, formattable presentation text.
id 14.1 Beta
The stable form-local field ID used as the submitted dictionary key.
label 14.1 Beta
The label, including its required fallback format.
type 14.1 Beta
The host-renderable field type.
description 14.1 Beta
An optional description with its fallback format.
isRequired 14.1 Beta
Whether the plugin requires a submitted value.
defaultValue 14.1 Beta
An optional data value. Secret fields cannot define one.
options 14.1 Beta
The options for a choice field, or null for other field types.
helpUri 14.1 Beta
An optional absolute help URI.
helpLabel 14.1 Beta
The help-link label required when a help URI is supplied.

Properties

DefaultValue 14.1 Beta

C#
public string? DefaultValue { get; }
Gets the optional default value.

Description 14.1 Beta

C#
public override Unbroken.LaunchBox.Plugins.PluginText? Description { get; }
Gets the optional localizable, formattable description.

HelpLabel 14.1 Beta

C#
public Unbroken.LaunchBox.Plugins.PluginText? HelpLabel { get; }
Gets the localizable, formattable help-link label.

HelpUri 14.1 Beta

C#
public System.Uri? HelpUri { get; }
Gets the absolute help URI.

Id 14.1 Beta

C#
public string Id { get; }
Gets the stable form-local field ID.

IsRequired 14.1 Beta

C#
public bool IsRequired { get; }
Gets whether the plugin requires a submitted value.

Label 14.1 Beta

C#
public override Unbroken.LaunchBox.Plugins.PluginText Label { get; }
Gets the localizable, formattable label and its fallback format.

Maximum 14.1 Beta

C#
public int Maximum { get; private init; }
Gets the inclusive maximum for an integer field.

Minimum 14.1 Beta

C#
public int Minimum { get; private init; }
Gets the inclusive minimum for an integer field.

Options 14.1 Beta

C#
public System.Collections.Generic.IReadOnlyList<Unbroken.LaunchBox.Plugins.Forms.PluginFormFieldOption> Options { get; }
Gets the choices available for a choice field.

Type 14.1 Beta

C#
public Unbroken.LaunchBox.Plugins.Forms.PluginFormFieldType Type { get; }
Gets the host-renderable field type.

Methods

Boolean 14.1 Beta

C#
public static Unbroken.LaunchBox.Plugins.Forms.PluginFormField Boolean(string id, Unbroken.LaunchBox.Plugins.PluginText label, bool defaultValue = false, Unbroken.LaunchBox.Plugins.PluginText? description = null)
Creates a checkbox field.
id 14.1 Beta
The stable field ID.
label 14.1 Beta
The localizable label.
defaultValue 14.1 Beta
The initial Boolean value.
description 14.1 Beta
Optional localizable help text.

Returns

The field definition.

Choice 14.1 Beta

C#
public static Unbroken.LaunchBox.Plugins.Forms.PluginFormField Choice(string id, Unbroken.LaunchBox.Plugins.PluginText label, System.Collections.Generic.IReadOnlyList<Unbroken.LaunchBox.Plugins.Forms.PluginFormFieldOption> choices, string? defaultValue = null, Unbroken.LaunchBox.Plugins.PluginText? description = null)
Creates a dropdown field.
id 14.1 Beta
The stable field ID.
label 14.1 Beta
The localizable label.
choices 14.1 Beta
The available choices; empty string values are allowed.
defaultValue 14.1 Beta
The initial choice value, or null for no selection.
description 14.1 Beta
Optional localizable help text.

Returns

The field definition.

FilePath 14.1 Beta

C#
public static Unbroken.LaunchBox.Plugins.Forms.PluginFormField FilePath(string id, Unbroken.LaunchBox.Plugins.PluginText label, string? defaultValue = null, Unbroken.LaunchBox.Plugins.PluginText? description = null)
Creates a file path field with a browse button.
id 14.1 Beta
The stable field ID.
label 14.1 Beta
The localizable label.
defaultValue 14.1 Beta
The initial path.
description 14.1 Beta
Optional localizable help text.

Returns

The field definition.

FolderPath 14.1 Beta

C#
public static Unbroken.LaunchBox.Plugins.Forms.PluginFormField FolderPath(string id, Unbroken.LaunchBox.Plugins.PluginText label, string? defaultValue = null, Unbroken.LaunchBox.Plugins.PluginText? description = null)
Creates a folder path field with a browse button.
id 14.1 Beta
The stable field ID.
label 14.1 Beta
The localizable label.
defaultValue 14.1 Beta
The initial path.
description 14.1 Beta
Optional localizable help text.

Returns

The field definition.

Integer 14.1 Beta

C#
public static Unbroken.LaunchBox.Plugins.Forms.PluginFormField Integer(string id, Unbroken.LaunchBox.Plugins.PluginText label, int defaultValue = 0, int minimum = -2147483648, int maximum = 2147483647, Unbroken.LaunchBox.Plugins.PluginText? description = null)
Creates a bounded whole-number field.
id 14.1 Beta
The stable field ID.
label 14.1 Beta
The localizable label.
defaultValue 14.1 Beta
The initial value, within the inclusive bounds.
minimum 14.1 Beta
The inclusive lower bound.
maximum 14.1 Beta
The inclusive upper bound.
description 14.1 Beta
Optional localizable help text.

Returns

The field definition.

Text 14.1 Beta

C#
public static Unbroken.LaunchBox.Plugins.Forms.PluginFormField Text(string id, Unbroken.LaunchBox.Plugins.PluginText label, string? defaultValue = null, Unbroken.LaunchBox.Plugins.PluginText? description = null)
Creates a text field.
id 14.1 Beta
The stable field ID.
label 14.1 Beta
The localizable label.
defaultValue 14.1 Beta
The initial value.
description 14.1 Beta
Optional localizable help text.

Returns

The field definition.

VisibleWhen 14.1 Beta

C#
public override Unbroken.LaunchBox.Plugins.Forms.PluginFormField VisibleWhen(string key, string value)
Returns a copy displayed only when another field has the specified value.
key 14.1 Beta
The controlling field ID, matched without regard to case.
value 14.1 Beta
The required value. Boolean values are compared as Booleans; other values are ordinal.

Returns

The field with its visibility condition. Hidden fields retain their values and participate in submission.