pub trait DynFormField: Display {
// Required methods
fn dyn_options(&self) -> &FormFieldOptions;
fn dyn_id(&self) -> &str;
fn dyn_value(&self) -> Option<&str>;
fn dyn_set_value(&mut self, value: Cow<'_, str>);
}Expand description
A version of FormField that can be used in a dynamic context.
This trait is used to allow a form field to be used in a dynamic context, such as when using Form field iterator. It provides access to the field’s options, value, and rendering, among others.
This trait is implemented for all types that implement FormField.
Required Methods§
Sourcefn dyn_options(&self) -> &FormFieldOptions
fn dyn_options(&self) -> &FormFieldOptions
Returns the generic options for the form field.
Sourcefn dyn_set_value(&mut self, value: Cow<'_, str>)
fn dyn_set_value(&mut self, value: Cow<'_, str>)
Sets the string value of the form field.