pub struct FormSettings {
pub submit_label: String,
pub success_message: String,
pub redirect_url: String,
pub notify_emails: String,
pub builtin_css: bool,
pub next_label: String,
pub back_label: String,
pub progress_label: String,
pub error_message: String,
}Expand description
Form-level defaults. An embed block may override the success redirect / message per placement.
Fields§
§submit_label: String§success_message: String§redirect_url: String§notify_emails: StringComma-separated recipient list for submit notifications.
builtin_css: boolAuto-link the bundled /forms/forms.css. Turn off to fully replace
the styling with your own stylesheet. Default true.
next_label: StringThe multi-page buttons and progress line; empty → the English
default (FormSettings::next_text and friends). Translatable.
back_label: String§progress_label: String{n} and {total} are replaced, e.g. Step {n} of {total}.
error_message: StringShown when the server refuses a submission.
Implementations§
Source§impl FormSettings
impl FormSettings
Sourcepub fn submit_text(&self) -> &str
pub fn submit_text(&self) -> &str
The submit button’s text.
Sourcepub fn success_text(&self) -> &str
pub fn success_text(&self) -> &str
The message shown after a successful submission.
Sourcepub fn progress_text(&self) -> &str
pub fn progress_text(&self) -> &str
The progress line, with {n} / {total} placeholders.
Sourcepub fn error_text(&self) -> &str
pub fn error_text(&self) -> &str
The banner shown when the server refused the submission.
Trait Implementations§
Source§impl Clone for FormSettings
impl Clone for FormSettings
Source§impl Debug for FormSettings
impl Debug for FormSettings
Source§impl Default for FormSettings
impl Default for FormSettings
Source§impl<'de> Deserialize<'de> for FormSettings
impl<'de> Deserialize<'de> for FormSettings
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 PartialEq for FormSettings
impl PartialEq for FormSettings
Source§impl Serialize for FormSettings
impl Serialize for FormSettings
impl StructuralPartialEq for FormSettings
Auto Trait Implementations§
impl Freeze for FormSettings
impl RefUnwindSafe for FormSettings
impl Send for FormSettings
impl Sync for FormSettings
impl Unpin for FormSettings
impl UnsafeUnpin for FormSettings
impl UnwindSafe for FormSettings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.