Skip to content

Instantly share code, notes, and snippets.

@lepinekong
Last active November 9, 2017 19:44
Show Gist options
  • Save lepinekong/88473968601901f82bc5781285543cdf to your computer and use it in GitHub Desktop.
Save lepinekong/88473968601901f82bc5781285543cdf to your computer and use it in GitHub Desktop.
Replacing form by win between ```
rules: [
(code: false)
any [
thru {```} (code: not code)
any [
to "form" mark: (
if code [remove/part mark 4 insert mark "win"]
)
|
thru {```} (code: not code)
]
]
to end]
content: {The simplest version of form is:
```
form: []
append form [field field field button]
view form
```
![Basic Form](images/Basic-Form.png)
A nicer form with labels (with text keyword) and vertical alignment (with return keyword) is:
```
form: []
append form [text "stock symbol:"]
append form [field]
append form [return]
append form [text "start date:"]
append form [field]
append form [return]
append form [text "end date:"]
append form [field]
append form [return]
append form [button "OK"]
view form
```
}
parse content rules
write-clipboard content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment