expression 'initField("Email Address", "", "", defaultInput)' is of type: Field
- Vorherrschende Sprache
- Nim
- Sterne
- 4
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I don't know if i use it wrong but when i just copy your example and run it, it throws error:
```nim
import dalo
var myForm = makeForm:
email = initField(label = "Email Address").setAttrs(type="email", placeholder = "something@gmail.com")
name = initField(label="Name", default = "Hey").setAttrs(type="text", placeholder="John Doe")
location = initField(label="Location", default = "USA", options = {"USA": "United States", "GB": "Great Brit"})
aboutYou = initField(label="About", default = "Hey there, my name is John Smith", widget = defaultTextarea)
echo myForm
```
```
c:\Users\david\projects\nimPlayground\dalot.nim(4, 45) Error: type mismatch: got
but expected one of:
template `.`(form: Form; fieldName: untyped): Field
first type mismatch at position: 1
required type for form: Form
but expression 'initField("Email Address", "", "", defaultInput)' is of type: Field
expression: setAttrs(initField("Email Address", "", "", defaultInput), type = "email",
placeholder = "something@gmail.com")
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.