LaunchBoxContributors
On this page

PluginFormElement14.1

Class in Unbroken.LaunchBox.Plugins.Models.Forms

C#
public abstract class PluginFormElement
A presentation element in a plugin form: a value-bearing field, an action, or a group of elements.

Properties

  • DescriptionGets the optional localizable description.
  • LabelGets the localizable label, or null for an unnamed group.
  • VisibleWhenKeyGets the ID of the field controlling visibility, or null when always visible.
  • VisibleWhenValueGets the controlling field value that makes this element visible.

Description

C#
public abstract PluginText? Description { get; }
Gets the optional localizable description.

Label

C#
public abstract PluginText? Label { get; }
Gets the localizable label, or null for an unnamed group.

VisibleWhenKey

C#
public string? VisibleWhenKey { get; }
Gets the ID of the field controlling visibility, or null when always visible.

VisibleWhenValue

C#
public string? VisibleWhenValue { get; }
Gets the controlling field value that makes this element visible.

Methods

  • VisibleWhenReturns a copy displayed only when a field has the specified value.

VisibleWhen

C#
public virtual PluginFormElement VisibleWhen(string key, string value)
Returns a copy displayed only when a field has the specified value.
key
The controlling field ID, matched without regard to case. A missing controller leaves the element visible.
value
The required value. Boolean values are compared as Booleans; other values are ordinal.

Returns

The element with its visibility condition. A hidden group hides all descendants. Hidden fields retain their values and participate in submission.