form
konigle.models.core.form
¶
Form models for the Konigle SDK.
This module provides models for form resources from the forms service. Forms have integer IDs as they come from a separate service.
Form
¶
Bases: BaseResource, TimestampMixin
Form resource model.
Represents a form with fields from the forms service. Uses integer ID as it comes from a separate service.
captcha_enabled = Field(default=None, title='Captcha Enabled', description='Whether CAPTCHA is enabled for this form.')
class-attribute
instance-attribute
¶
Whether CAPTCHA is enabled for this form.
captcha_site_key = Field(default=None, title='Captcha Site Key', description='CAPTCHA site key for client-side validation.')
class-attribute
instance-attribute
¶
CAPTCHA site key for client-side validation.
endpoint_url = Field(..., title='Endpoint URL', description='The URL endpoint for form submissions.', serialization_alias='submission_url')
class-attribute
instance-attribute
¶
The URL endpoint for form submissions.
id = Field(..., title='Form ID', description='Unique identifier for the form.')
class-attribute
instance-attribute
¶
Unique identifier for the form.
is_active = Field(..., title='Is Active', description='Whether the form is active.')
class-attribute
instance-attribute
¶
Whether the form is active.
name = Field(..., title='Form Name', description='The name of the form.')
class-attribute
instance-attribute
¶
The name of the form.
slug = Field(..., title='Slug', description='URL-friendly slug for the form.')
class-attribute
instance-attribute
¶
URL-friendly slug for the form.
FormCreate
¶
Bases: CreateModel
Form creation model.
Defines fields required when creating a new form. The slug is auto-generated from the name.
name = Field(..., title='Form Name', description='The name of the form.')
class-attribute
instance-attribute
¶
The name of the form.
FormSubmission
¶
Bases: BaseResource
Form submission resource model.
Represents a submission to a form with all metadata and spam detection.
country = Field(default=None, title='Country', description='ISO country code (2 characters).')
class-attribute
instance-attribute
¶
ISO country code (2 characters).
emails_sent = Field(default=None, title='Emails Sent', description='List of email addresses that were sent notifications.')
class-attribute
instance-attribute
¶
List of email addresses that were sent notifications.
form_data = Field(default=None, title='Form Data', description='The submitted form data as key-value pairs.')
class-attribute
instance-attribute
¶
The submitted form data as key-value pairs.
form_name = Field(default=None, title='Form Name', description='Name of the form that was submitted.')
class-attribute
instance-attribute
¶
Name of the form that was submitted.
form_slug = Field(default=None, title='Form Slug', description='Slug of the form that was submitted.')
class-attribute
instance-attribute
¶
Slug of the form that was submitted.
id = Field(..., title='Submission ID', description='Unique identifier for the form submission.')
class-attribute
instance-attribute
¶
Unique identifier for the form submission.
ip_address = Field(..., title='IP Address', description='IP address of the submitter.')
class-attribute
instance-attribute
¶
IP address of the submitter.
is_spam = Field(default=False, title='Is Spam', description='Whether this submission was detected as spam.')
class-attribute
instance-attribute
¶
Whether this submission was detected as spam.
spam_confidence = Field(default=0.0, ge=0.0, le=1.0, title='Spam Confidence', description='Confidence score for spam detection (0.0 to 1.0).')
class-attribute
instance-attribute
¶
Confidence score for spam detection (0.0 to 1.0).
spam_reason = Field(default=None, title='Spam Reason', description='Reason why submission was marked as spam.')
class-attribute
instance-attribute
¶
Reason why submission was marked as spam.
submitted_at = Field(..., title='Submitted At', description='Timestamp when the form was submitted.')
class-attribute
instance-attribute
¶
Timestamp when the form was submitted.
user_agent = Field(default=None, title='User Agent', description='Browser user agent string.')
class-attribute
instance-attribute
¶
Browser user agent string.