I would say the main thing I’m struggling with in WeWeb is understanding the different types of variables. For example, I created a brand new project to test this. I placed a single form on a page with three fields, and I counted a total of 26 variables.
I’m building a multi-tenant client portal, so it’s important that I use the correct variables. The confusing part is that some variables seem to hold the same values—like formData
and fields
.
How can I be sure I’m using the right ones?
The 3 form input fields are 1 text area input, 1 select dropdown input and 1 rich text editor input.
Here is a list of all the variables that appear for this 3-field form:
formData.title
formData.undefined
fields.title.value
fields.title.isValid
fields.undefined.value
fields.undefined.isValid
isSubmitting
isSubmitted
isValid
Form Input - value
Rich text - mentions
Rich text - mentions[0]
Rich text - states.textType
Rich text - states.textColor
Rich text - states.bold
Rich text - states.italic
Rich text - states.underline
Rich text - states.strike
Rich text - states.bulletList
Rich text - states.orderedList
Rich text - states.checkList
Rich text - states.link
Rich text - states.codeBlock
Rich text - states.blockquote
Rich text - states.textAlign
Rich text - states.table