pub struct FormField {Show 14 fields
pub name: Option<String>,
pub id: Option<String>,
pub field_type: FieldType,
pub label: Option<String>,
pub placeholder: Option<String>,
pub value: Option<String>,
pub required: bool,
pub disabled: bool,
pub readonly: bool,
pub autocomplete: Option<String>,
pub pattern: Option<String>,
pub min_length: Option<u32>,
pub max_length: Option<u32>,
pub options: Vec<SelectOption>,
}Expand description
Form field
Fields§
§name: Option<String>Field name
id: Option<String>Field ID
field_type: FieldTypeField type
label: Option<String>Field label
placeholder: Option<String>Placeholder text
value: Option<String>Default value
required: boolWhether field is required
disabled: boolWhether field is disabled
readonly: boolWhether field is readonly
autocomplete: Option<String>Autocomplete attribute
pattern: Option<String>Pattern attribute (for validation)
min_length: Option<u32>Min length
max_length: Option<u32>Max length
options: Vec<SelectOption>Select options (for select fields)
Implementations§
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 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