pub struct FormProps {
pub action: Action,
pub method: Option<HttpMethod>,
pub guard: Option<String>,
pub max_width: Option<FormMaxWidth>,
pub id: Option<String>,
pub enctype: Option<String>,
}Expand description
Props for Form component.
Fields§
§action: Action§method: Option<HttpMethod>§guard: Option<String>Form guard type. When set, the runtime JS disables the submit button
until the guard condition is met. Value: "number-gt-0" — at least
one number input must have value > 0.
max_width: Option<FormMaxWidth>Optional max-width constraint for the form container.
id: Option<String>Optional HTML id attribute for the rendered <form>. Pair with a
Button’s form prop to submit this form from a button placed outside
it (e.g. in a PageHeader actions slot).
enctype: Option<String>HTML form enctype attribute. Set to "multipart/form-data" for forms
carrying a file input. Without this, the browser default encoding
(application/x-www-form-urlencoded) is used and file inputs are sent
as plain text rather than a multipart body.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FormProps
impl<'de> Deserialize<'de> for FormProps
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
Source§impl JsonSchema for FormProps
impl JsonSchema for FormProps
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for FormProps
Auto Trait Implementations§
impl Freeze for FormProps
impl RefUnwindSafe for FormProps
impl Send for FormProps
impl Sync for FormProps
impl Unpin for FormProps
impl UnsafeUnpin for FormProps
impl UnwindSafe for FormProps
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