pub enum FormField {
TextInput(TextInputField),
TextArea(TextAreaField),
Checkbox(CheckboxField),
RadioGroup(RadioGroupField),
Dropdown(DropdownField),
DatePicker(DatePickerField),
Signature(SignatureField),
}Expand description
A form field that can appear in a Codex document.
Variants§
TextInput(TextInputField)
Single-line text input.
TextArea(TextAreaField)
Multi-line text input.
Checkbox(CheckboxField)
Boolean checkbox.
RadioGroup(RadioGroupField)
Single selection from radio options.
Dropdown(DropdownField)
Dropdown selection.
DatePicker(DatePickerField)
Date/time picker.
Signature(SignatureField)
Digital signature capture.
Implementations§
Source§impl FormField
impl FormField
Sourcepub fn from_extension(ext: &ExtensionBlock) -> Option<Self>
pub fn from_extension(ext: &ExtensionBlock) -> Option<Self>
Try to convert an extension block to a form field.
Sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
Check if the field is required.
Sourcepub fn validation(&self) -> Option<&FormValidation>
pub fn validation(&self) -> Option<&FormValidation>
Get the field’s validation rules.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FormField
impl<'de> Deserialize<'de> for FormField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for FormField
Auto Trait Implementations§
impl Freeze for FormField
impl RefUnwindSafe for FormField
impl Send for FormField
impl Sync for FormField
impl Unpin for FormField
impl UnsafeUnpin for FormField
impl UnwindSafe for FormField
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more