Class: Moonbase::Models::Form
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Moonbase::Models::Form
- Defined in:
- lib/moonbase/models/form.rb
Overview
Instance Attribute Summary collapse
-
#business_email_required ⇒ Boolean
‘true` if submissions require a business email address, blocking free and disposable providers.
-
#collection ⇒ Moonbase::Models::Collection
The ‘Collection` that submissions to this form are saved to.
-
#created_at ⇒ Time
Time at which the object was created, as an ISO 8601 timestamp in UTC.
-
#id ⇒ String
Unique identifier for the object.
-
#name ⇒ String
The name of the form, used as the title on its public page.
-
#pages_enabled ⇒ Boolean
If ‘true`, a Moonbase Pages hosted page is enabled for this form, providing a standalone public URL for sharing.
-
#pages_url ⇒ String?
The public URL for the form, if ‘pages_enabled` is `true`.
-
#redirect_url ⇒ String?
Optional URL the user is redirected to after a successful submission.
-
#type ⇒ Symbol, :form
String representing the object’s type.
-
#updated_at ⇒ Time
Time at which the object was last updated, as an ISO 8601 timestamp in UTC.
Instance Method Summary collapse
-
#initialize(id:, business_email_required:, collection:, created_at:, name:, pages_enabled:, updated_at:, pages_url: nil, redirect_url: nil, type: :form) ⇒ Object
constructor
Some parameter documentations has been truncated, see Form for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, business_email_required:, collection:, created_at:, name:, pages_enabled:, updated_at:, pages_url: nil, redirect_url: nil, type: :form) ⇒ Object
Some parameter documentations has been truncated, see Moonbase::Models::Form for more details.
A Form provides a way to create ‘Items` in a `Collection`, often via a public URL for external users. Each form submission creates a new item.
|
|
# File 'lib/moonbase/models/form.rb', line 76
|
Instance Attribute Details
#business_email_required ⇒ Boolean
‘true` if submissions require a business email address, blocking free and disposable providers.
18 |
# File 'lib/moonbase/models/form.rb', line 18 required :business_email_required, Moonbase::Internal::Type::Boolean |
#collection ⇒ Moonbase::Models::Collection
The ‘Collection` that submissions to this form are saved to.
24 |
# File 'lib/moonbase/models/form.rb', line 24 required :collection, -> { Moonbase::Collection } |
#created_at ⇒ Time
Time at which the object was created, as an ISO 8601 timestamp in UTC.
30 |
# File 'lib/moonbase/models/form.rb', line 30 required :created_at, Time |
#id ⇒ String
Unique identifier for the object.
11 |
# File 'lib/moonbase/models/form.rb', line 11 required :id, String |
#name ⇒ String
The name of the form, used as the title on its public page.
36 |
# File 'lib/moonbase/models/form.rb', line 36 required :name, String |
#pages_enabled ⇒ Boolean
If ‘true`, a Moonbase Pages hosted page is enabled for this form, providing a standalone public URL for sharing.
43 |
# File 'lib/moonbase/models/form.rb', line 43 required :pages_enabled, Moonbase::Internal::Type::Boolean |
#pages_url ⇒ String?
The public URL for the form, if ‘pages_enabled` is `true`.
61 |
# File 'lib/moonbase/models/form.rb', line 61 optional :pages_url, String |
#redirect_url ⇒ String?
Optional URL the user is redirected to after a successful submission. When unset, no redirect occurs. Stored as a Liquid template; rendered at submission time with form field values under ‘submission.<key>` (keyed by the field’s ‘key`) plus UTM params (`utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`) automatically appended. Use the `uri_encode` filter for URL-safe values, e.g. `example.com/thanks?email=submission.email | uri_encode }`. The rendered URL must parse as a valid URL or the submission errors.
74 |
# File 'lib/moonbase/models/form.rb', line 74 optional :redirect_url, String |
#type ⇒ Symbol, :form
String representing the object’s type. Always ‘form` for this object.
49 |
# File 'lib/moonbase/models/form.rb', line 49 required :type, const: :form |
#updated_at ⇒ Time
Time at which the object was last updated, as an ISO 8601 timestamp in UTC.
55 |
# File 'lib/moonbase/models/form.rb', line 55 required :updated_at, Time |