pub struct FormProps {Show 24 fields
pub layout: FormLayout,
pub size: ControlSize,
pub colon: bool,
pub required_mark: RequiredMark,
pub label_align: LabelAlign,
pub label_wrap: bool,
pub label_col: Option<ColProps>,
pub wrapper_col: Option<ColProps>,
pub disabled: bool,
pub variant: Option<Variant>,
pub scroll_to_first_error: bool,
pub scroll_to_first_error_config: Option<ScrollToFirstErrorConfig>,
pub feedback_icons: Option<FeedbackIcons>,
pub name: Option<String>,
pub initial_values: Option<FormValues>,
pub form: Option<FormHandle>,
pub class: Option<String>,
pub style: Option<String>,
pub class_names: Option<FormClassNames>,
pub styles: Option<FormStyles>,
pub on_finish: Option<EventHandler<FormFinishEvent>>,
pub on_finish_failed: Option<EventHandler<FormFinishFailedEvent>>,
pub on_values_change: Option<EventHandler<ValuesChangeEvent>>,
pub children: Element,
}Fields§
§layout: FormLayout§size: ControlSize§colon: bool§required_mark: RequiredMark§label_align: LabelAlign§label_wrap: boolWhether to wrap label text when it’s too long.
label_col: Option<ColProps>§wrapper_col: Option<ColProps>§disabled: bool§variant: Option<Variant>Visual variant for form controls (outlined/filled/borderless).
scroll_to_first_error: boolWhether to scroll to the first field with error on submit failure. Can be true (default scroll behavior) or a config object.
scroll_to_first_error_config: Option<ScrollToFirstErrorConfig>Custom scroll config for scroll_to_first_error.
feedback_icons: Option<FeedbackIcons>Feedback icons configuration for form items.
name: Option<String>Form name, used for form identification and grouping.
initial_values: Option<FormValues>§form: Option<FormHandle>§class: Option<String>§style: Option<String>§class_names: Option<FormClassNames>Semantic class names for sub-parts.
styles: Option<FormStyles>Semantic styles for sub-parts.
on_finish: Option<EventHandler<FormFinishEvent>>§on_finish_failed: Option<EventHandler<FormFinishFailedEvent>>§on_values_change: Option<EventHandler<ValuesChangeEvent>>表单字段值变更时的回调,主要用于字段联动与调试。
children: ElementImplementations§
Source§impl FormProps
impl FormProps
Sourcepub fn builder() -> FormPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> FormPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building FormProps.
On the builder, call .layout(...)(optional), .size(...)(optional), .colon(...)(optional), .required_mark(...)(optional), .label_align(...)(optional), .label_wrap(...)(optional), .label_col(...)(optional), .wrapper_col(...)(optional), .disabled(...)(optional), .variant(...)(optional), .scroll_to_first_error(...)(optional), .scroll_to_first_error_config(...)(optional), .feedback_icons(...)(optional), .name(...)(optional), .initial_values(...)(optional), .form(...)(optional), .class(...)(optional), .style(...)(optional), .class_names(...)(optional), .styles(...)(optional), .on_finish(...)(optional), .on_finish_failed(...)(optional), .on_values_change(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of FormProps.