LaunchBoxContributors
On this page

PluginFormGroup14.1

Class in Unbroken.LaunchBox.Plugins.Models.Forms

C#
public sealed class PluginFormGroup : PluginFormElement
Groups related fields and groups under an optional localizable heading.

Remarks

Groups affect presentation only. They have no field ID or submitted value.

Inheritance and interfaces

Constructors

PluginFormGroup(PluginText, IReadOnlyList<…>, PluginText)

C#
public PluginFormGroup(
    PluginText? label,
    IReadOnlyList<PluginFormElement> elements,
    PluginText? description = null
)
Creates an ordered group containing fields, nested groups, or both.
label
The heading, or null for an unnamed group.
elements
The child elements in presentation order.
description
Optional localizable text below the heading.

PluginFormGroup(PluginText, IReadOnlyList<…>)

C#
public PluginFormGroup(PluginText? label, IReadOnlyList<PluginFormField> fields)
Creates an ordered group of fields.
label
The heading, or null for an unnamed group.
fields
The fields in this group.

Properties

  • DescriptionGets the optional localizable description.
  • ElementsGets the child elements in presentation order.
  • LabelGets the localizable label, or null for an unnamed group.

Description

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

Elements

C#
public IReadOnlyList<PluginFormElement> Elements { get; }
Gets the child elements in presentation order.

Label

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

Methods

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

VisibleWhen

C#
public override PluginFormGroup 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.