File
Description
Each entity of this type defines a new publicly accessible form
that can be reached through the given route even by users without being logged in.
columns
|
Type : FieldGroup[]
|
Decorators :
@DatabaseField({label: undefined, editComponent: 'EditPublicFormColumns', isArray: true})
|
|
description
|
Type : string
|
Decorators :
@DatabaseField({label: undefined, dataType: undefined})
|
|
entity
|
Type : string
|
Decorators :
@DatabaseField({label: undefined, description: undefined, editComponent: 'EditEntityType', viewComponent: 'DisplayEntityType', validators: undefined})
|
|
Static
label
|
Default value : $localize`:PublicFormConfig:Public Form`
|
|
Static
labelPlural
|
Default value : $localize`:PublicFormConfig:Public Forms`
|
|
logo
|
Type : string
|
Decorators :
@DatabaseField({label: undefined, description: undefined, dataType: 'file', additional: 300})
|
|
prefilled
|
use ColumnConfig directly in the columns array instead
|
Decorators :
@DatabaseField()
|
|
prefilledFields
|
Type : FormFieldConfig[]
|
Decorators :
@DatabaseField({label: undefined, editComponent: 'EditPrefilledValuesComponent', isArray: true})
|
|
Static
route
|
Type : string
|
Default value : "admin/public-form"
|
|
route
|
Type : string
|
Decorators :
@DatabaseField({label: undefined, validators: undefined, editComponent: 'EditPublicformRoute'})
|
|
title
|
Type : string
|
Decorators :
@DatabaseField({label: undefined})
|
|
Static
toStringAttributes
|
Type : []
|
Default value : ["title"]
|
|
import { Entity } from "../../core/entity/model/entity";
import { DatabaseEntity } from "../../core/entity/database-entity.decorator";
import { DatabaseField } from "../../core/entity/database-field.decorator";
import { LongTextDatatype } from "app/core/basic-datatypes/string/long-text.datatype";
import { FieldGroup } from "app/core/entity-details/form/field-group";
import { FormFieldConfig } from "app/core/common-components/entity-form/FormConfig";
/**
* Each entity of this type defines a new publicly accessible form
* that can be reached through the given route even by users without being logged in.
*/
@DatabaseEntity("PublicFormConfig")
export class PublicFormConfig extends Entity {
static override label = $localize`:PublicFormConfig:Public Form`;
static override labelPlural = $localize`:PublicFormConfig:Public Forms`;
static override route = "admin/public-form";
static override toStringAttributes = ["title"];
@DatabaseField({
label: $localize`:PublicFormConfig:Form Logo`,
description: $localize`:PublicFormConfig:Add an image to be displayed at the top of the form`,
dataType: "file",
additional: 300,
})
logo: string;
@DatabaseField({
label: $localize`:PublicFormConfig:Title`,
})
title: string;
@DatabaseField({
label: $localize`:PublicFormConfig:Form Link ID`,
validators: {
required: true,
},
editComponent: "EditPublicformRoute",
})
route: string;
@DatabaseField({
label: $localize`:PublicFormConfig:Description`,
dataType: LongTextDatatype.dataType,
})
description: string;
@DatabaseField({
label: $localize`:PublicFormConfig:Entity`,
description: $localize`:PublicFormConfig:The type of record that is created when a someone submits the form (e.g. if you select "Note" here, the form will create new entries in your "Notes List" and you can select only fields of your "Note" data structure for this form)`,
editComponent: "EditEntityType",
viewComponent: "DisplayEntityType",
validators: {
required: true,
readonlyAfterSet: true,
},
})
entity: string;
@DatabaseField({
label: $localize`:PublicFormConfig:Fields`,
editComponent: "EditPublicFormColumns",
isArray: true,
})
columns: FieldGroup[];
/** @deprecated use ColumnConfig directly in the columns array instead */
@DatabaseField() prefilled: { [key in string]: any };
@DatabaseField({
label: $localize`:PublicFormConfig:Prefilled Fields`,
editComponent: "EditPrefilledValuesComponent",
isArray: true,
})
prefilledFields: FormFieldConfig[];
}