pub struct HtmlFormConfig {
pub stringvar_html_template: String,
pub emailvar_html_template: String,
pub boolvar_html_template: String,
pub prefix_html_template: Option<String>,
pub wrap_tag: Option<String>,
}Expand description
Configuration for HtmlFormAction
Customize the output of HtmlFormAction with these parameters. The templates can use {{name}} as a placeholder for the Var name.
let mut html_form_config: HtmlFormConfig = Default::default();
html_form_config.stringvar_html_template = "<textarea name='{{name}}'></textarea>".to_owned();Fields§
§stringvar_html_template: StringHTML template for StringVar
emailvar_html_template: StringHTML template for EmailVar
boolvar_html_template: StringHTML template for BoolVar
prefix_html_template: Option<String>Optional HTML template inserted before any field For example, you can output a label for every field with:
html_form_config.prefix_html_template = Some("<label for='{{name}}'>{{name}}</label>".to_owned());wrap_tag: Option<String>HTML tag that will wrap the prefix and field templates. For example, you can wrap every field + label with a div:
html_form_config.wrap_tag = Some("div".to_owned());Trait Implementations§
Source§impl Debug for HtmlFormConfig
impl Debug for HtmlFormConfig
Auto Trait Implementations§
impl Freeze for HtmlFormConfig
impl RefUnwindSafe for HtmlFormConfig
impl Send for HtmlFormConfig
impl Sync for HtmlFormConfig
impl Unpin for HtmlFormConfig
impl UnwindSafe for HtmlFormConfig
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