Skip to content

How do I access the state variable in an UAuthForm? #140

@daniosoriov

Description

@daniosoriov

Suppose I have the need to access the state value of a variable in my signup form and I am using UAuthForm, as in your example here: https://github.com/nuxt-ui-pro/saas/blob/main/app/pages/signup.vue, you don't have anything to check the state.

I used the form variable like this:

const form = useTemplateRef('form')

and then added it to the template like you indicate (snippet):

<template>
  <UAuthForm
    ref="form"
    :fields="fields">
{{ state.password }}
  </UAuthForm>
</template>

So, when inside of the template I want to access something like: state.password, that's non existent.

How would I access it?

I tried via form, but I do not see anything containing the values of the form there.

What I want to achieve is a dynamic password check that marks a checkmark as green as the conditions of the password are met. Maybe you already have an example somewhere?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions