Form

Overview #

Form represents a single form in an application, containing multiple fields. Forms organize related settings.

Location: orchesty-php-sdk/src/Application/Model/Form/Form.php

Constructor #

public function __construct(string $key, string $publicName)
ParameterTypeDescription
$keystringUnique form identifier
$publicNamestringDisplay name

Methods #

addField() #

public function addField(Field $field): self

Adds a field to the form.

getFields() #

public function getFields(): array

Returns all fields.

setDescription() #

public function setDescription(string $value): self

Sets form description.

toArray() #

public function toArray(): array

Converts form to array format.

Usage Example #

use Hanaboso\PipesPhpSdk\Application\Model\Form\Form;
use Hanaboso\PipesPhpSdk\Application\Model/Form/Field;

$form = new Form('authorization_form', 'Authorization');
$form
    ->setDescription('Enter your API credentials')
    ->addField(new Field(Field::TEXT, 'api_key', 'API Key', null, true))
    ->addField(new Field(Field::PASSWORD, 'api_secret', 'API Secret', null, true));

See Also #

© 2025 Orchesty Solutions. All rights reserved.