Struct silkenweb::elements::FormBuilder [−][src]
pub struct FormBuilder(_);
Implementations
impl FormBuilder
[src]
impl FormBuilder
[src]pub fn id(self, value: impl AttributeValue<String>) -> FormBuilder
[src]
pub fn class(self, value: impl AttributeValue<String>) -> FormBuilder
[src]
pub fn accept_charset(self, value: impl AttributeValue<String>) -> FormBuilder
[src]
Space-separated character encodings the server accepts. The browser uses them in the order in which they are listed. The default value means the same encoding as the page.
pub fn action(self, value: impl AttributeValue<String>) -> FormBuilder
[src]
The URI of a program that processes the information submitted via the form.
pub fn autocomplete(self, value: impl AttributeValue<String>) -> FormBuilder
[src]
Indicates whether input elements can by default have their values automatically
completed by the browser. autocomplete attributes on form elements override it on
<form>
. Possible values:
- off: The browser may not automatically complete entries. (Browsers tend to ignore this for suspected login forms; see The autocomplete attribute and login fields.)
- on: The browser may automatically complete entries.
pub fn enctype(self, value: impl AttributeValue<String>) -> FormBuilder
[src]
If the value of the method attribute is post, enctype is the MIME type of the form submission. Possible values:
- application/x-www-form-urlencoded: The default value.
- multipart/form-data: Use this if the form contains
<input>
elements with type=file. - text/plain: Introduced by HTML5 for debugging purposes.
This value can be overridden by formenctype attributes on <button>
,
<input type="submit">
, or <input type="image">
elements.
pub fn method(self, value: impl AttributeValue<String>) -> FormBuilder
[src]
The HTTP method to submit the form with. Possible values:
- post: The POST method; form data sent as the request body.
- get: The GET method; form data appended to the action URL with a ? separator. Use this method when the form has no side-effects.
- dialog: When the form is inside a
<dialog>
, closes the dialog on submission.
This value is overridden by formmethod attributes on <button>
,
<input type="submit">
, or <input type="image">
elements.
pub fn novalidate(self, value: impl AttributeValue<bool>) -> FormBuilder
[src]
Indicates that the form shouldn’t be validated when submitted. If this attribute is not
set (and therefore the form is validated), it can be overridden by a formnovalidate
attribute on a <button>
, <input type="submit">
, or <input type="image">
element
belonging to the form.
pub fn rel(self, value: impl AttributeValue<String>) -> FormBuilder
[src]
Creates a hyperlink or annotation depending on the value.
pub fn target(self, value: impl AttributeValue<String>) -> FormBuilder
[src]
Indicates where to display the response after submitting the form. It is a name/keyword for a browsing context (for example, tab, window, or iframe). The following keywords have special meanings:
- _self (default): Load into the same browsing context as the current one.
- _blank: Load into a new unnamed browsing context.
- _parent: Load into the parent browsing context of the current one. If no parent, behaves the same as _self.
- _top: Load into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one and has no parent). If no parent, behaves the same as _self.
This value can be overridden by a formtarget attribute on a <button>
,
<input type="submit">
, or <input type="image">
element.
impl FormBuilder
[src]
impl FormBuilder
[src]pub fn on_blur(
self,
f: impl FnMut(FocusEvent, HtmlFormElement) + 'static
) -> FormBuilder
[src]
self,
f: impl FnMut(FocusEvent, HtmlFormElement) + 'static
) -> FormBuilder
pub fn on_click(
self,
f: impl FnMut(MouseEvent, HtmlFormElement) + 'static
) -> FormBuilder
[src]
self,
f: impl FnMut(MouseEvent, HtmlFormElement) + 'static
) -> FormBuilder
pub fn on_change(
self,
f: impl FnMut(Event, HtmlFormElement) + 'static
) -> FormBuilder
[src]
self,
f: impl FnMut(Event, HtmlFormElement) + 'static
) -> FormBuilder
pub fn on_dblclick(
self,
f: impl FnMut(MouseEvent, HtmlFormElement) + 'static
) -> FormBuilder
[src]
self,
f: impl FnMut(MouseEvent, HtmlFormElement) + 'static
) -> FormBuilder
pub fn on_focusout(
self,
f: impl FnMut(FocusEvent, HtmlFormElement) + 'static
) -> FormBuilder
[src]
self,
f: impl FnMut(FocusEvent, HtmlFormElement) + 'static
) -> FormBuilder
pub fn on_input(
self,
f: impl FnMut(InputEvent, HtmlFormElement) + 'static
) -> FormBuilder
[src]
self,
f: impl FnMut(InputEvent, HtmlFormElement) + 'static
) -> FormBuilder
pub fn on_keydown(
self,
f: impl FnMut(KeyboardEvent, HtmlFormElement) + 'static
) -> FormBuilder
[src]
self,
f: impl FnMut(KeyboardEvent, HtmlFormElement) + 'static
) -> FormBuilder
pub fn on_keyup(
self,
f: impl FnMut(KeyboardEvent, HtmlFormElement) + 'static
) -> FormBuilder
[src]
self,
f: impl FnMut(KeyboardEvent, HtmlFormElement) + 'static
) -> FormBuilder
pub fn effect(self, f: impl Effect<HtmlFormElement>) -> FormBuilder
[src]
impl FormBuilder
[src]
impl FormBuilder
[src]pub fn text(self, child: impl Text) -> FormBuilder
[src]
pub fn child<Child>(self, c: Child) -> FormBuilder where
Child: Into<Element>,
[src]
Child: Into<Element>,
Trait Implementations
impl Builder for FormBuilder
[src]
impl Builder for FormBuilder
[src]type Target = Form
pub fn build(self) -> <FormBuilder as Builder>::Target
[src]
pub fn into_element(self) -> Element
[src]
impl DomElement for FormBuilder
[src]
impl DomElement for FormBuilder
[src]type Target = HtmlFormElement
pub fn dom_element(&self) -> <FormBuilder as DomElement>::Target
[src]
impl From<FormBuilder> for Element
[src]
impl From<FormBuilder> for Element
[src]pub fn from(builder: FormBuilder) -> Element
[src]
impl From<FormBuilder> for ElementBuilder
[src]
impl From<FormBuilder> for ElementBuilder
[src]pub fn from(builder: FormBuilder) -> ElementBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for FormBuilder
impl !RefUnwindSafe for FormBuilder
impl !Send for FormBuilder
impl !Send for FormBuilder
impl !Sync for FormBuilder
impl !Sync for FormBuilder
impl Unpin for FormBuilder
impl Unpin for FormBuilder
impl !UnwindSafe for FormBuilder
impl !UnwindSafe for FormBuilder