OLD | NEW |
(Empty) | |
| 1 --- |
| 2 layout: default |
| 3 title: Working with forms |
| 4 live_example_url: /docs/tutorials/forms/examples/slambook/out/web/slambook.html |
| 5 header: |
| 6 css: ["/samples/samples.css"] |
| 7 --- |
| 8 |
| 9 ## {{ page.title }} |
| 10 |
| 11 |
| 12 Enter some data and click the *Submit* button. The request gives you an innocent |
| 13 stare and displays “No server” because you are not running the server on your |
| 14 machine. |
| 15 |
| 16 This example show how to use a form to collect data from a user. |
| 17 |
| 18 A form usually contains several input elements for entering data of various |
| 19 kinds, such as names and addresses, birthdays, email addresses, and so on. |
| 20 HTML supports several kinds of input elements, including text fields, text |
| 21 areas, radio buttons, and checkboxes. HTML5 adds more specialized input |
| 22 elements such as email and password fields, color pickers, date and time |
| 23 widgets, and range elements. |
| 24 |
| 25 A form has an action, which is a URL to which to send the form data, and a |
| 26 method, which indicates how the form data is to be sent. The action and the |
| 27 method can be specified declaratively within HTML, or you can write Dart code |
| 28 and use Dart libraries to perform the action programmatically. |
| 29 |
| 30 Read this [tutorial](/docs/tutorials/forms) for |
| 31 more detail, or read the |
| 32 [source](https://github.com/dart-lang/dart-tutorials-samples/tree/master/web/sla
mbook). |
| 33 |
| 34 <iframe class="running-app-frame" |
| 35 style="height:400px;width:50%;" |
| 36 src="{{page.live_example_url}}"> |
| 37 </iframe> |
| 38 |
| 39 See all [samples](/samples/) |
OLD | NEW |