You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/FormsReadme.md
+16-3
Original file line number
Diff line number
Diff line change
@@ -41,13 +41,26 @@ Once you are set up with the code, take a look at some examples over at [solid-u
41
41
42
42
Most interesting may be how it is all wired together in the [test-form.js](https://github.com/SolidOS/solid-ui/blob/main/Documentation/form-examples/test-form.js), while the code for the form itself is mostly under [solid-ui/src/widgets/forms.js](https://github.com/SolidOS/solid-ui/blob/main/src/widgets/forms.js).
43
43
44
-
Locally you can take advantage of that.
44
+
## Running or testing it locally
45
+
46
+
Locally you can setup your own test of forms. All you need is the `/Documentation/form-examples` folders and the `test-form.js`.
47
+
48
+
1. First build solid-ui locally and copy it to `/Documentation/form-examples`
49
+
Run this instruction which will do all that for you.
45
50
```
46
51
npm run build-form-examples
47
52
```
48
-
and then you need to use the new build main.js by uncommenting the usage of teh script for example on line: https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L21 and commenting out the line: https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L15
53
+
2. Use the newly build solid-ui (called main.js) in your html.
54
+
You need to use the new build main.js:
55
+
* uncommenting the usage of the main.js script; Example [here](https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L21)
56
+
* commenting out the mashlib.js usage. Example [here](https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L15)
57
+
58
+
3. Use your own rad data and form
59
+
Switch out the `input` and `target` (form and raw data) links. Example [here](https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L56)
60
+
61
+
4. Run a local server
62
+
For example run `npx vite`in the `Documentation` folder and the navigate to something like: http://localhost:3000/form-examples/profile-demo.html
49
63
50
-
And then you just need to switch out the input nad target (form adn raw data) links on line https://github.com/SolidOS/solid-ui/blob/4f620aea3e91daf5ce9591dd83d3c95c161a44ad/Documentation/form-examples/structures3.html#L56
51
64
## Spin-offs & further examples
52
65
53
66
-[Jeff's solid-ui-components](https://github.com/jeff-zucker/solid-ui-components) is a different take on the UI vocabulary
0 commit comments