mofron-comp-form

0.13.0 • Public • Published

mofron-comp-form

mofron is module based frontend framework.

form component for mofron

Feature

  • send POST when submit component is clicked.
  • check automatically form item values.
  • show an error message if form item check is false.

Attention

  • form component child must be a formitem component.

Install

npm install mofron mofron-comp-form

Sample

<setting>
    <tag load="mofron-comp-form">Form</tag>
    <tag load="mofron-comp-input">Input</tag>
    <tag load="mofron-comp-radiolist">RadioList</tag>
    <tag load="mofron-comp-textarea">TextArea</tag>
    <tag load="mofron-layout-margin">Margin</tag>
</setting>

<Form width="4rem" layout=Margin:("top","0.2rem")>
    <Input label="input:"></Input>
    <RadioList layout=Margin:("left","0.1rem")>
        <radio>radio_1</radio>
        <radio>radio_2</radio>
    </RadioList>
    <TextArea label="textarea:"></TextArea>
</Form>

Parameter

Short
Form
Parameter Name Type Description
getChildHeight
false: not send (default)
callback function send event function
mix event parameter
sendEvent function send event function
mix event parameter
sendfunc function user defined send function
mixed function parameter
uri string send uri
getValue
mofron-comp-message: replace message component
undefined: call as getter
submitComp mixed string: submit text contents
component: submit component
undefined: call as getter
clear
undefined: call as getter

Readme

Keywords

Package Sidebar

Install

npm i mofron-comp-form

Weekly Downloads

6

Version

0.13.0

License

MIT

Unpacked Size

15.2 kB

Total Files

5

Last publish

Collaborators

  • simparts