Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with designing review page for multistep form #545

Open
arunpir opened this issue May 19, 2022 · 0 comments
Open

Issues with designing review page for multistep form #545

arunpir opened this issue May 19, 2022 · 0 comments

Comments

@arunpir
Copy link

arunpir commented May 19, 2022

I am designing a multistep form with few steps and storing data from each form step into Pinia to retrieve later on the review step.

I am struggling to achieve it because I need to have value and the label for the input fields to be displayed into the review page. Below is my code so far:

this is my input, so I m

<FormulateForm v-model="step1Values" @submit="showAlert">
<FormulateInput
      v-model="dataModel"
      name="additionalComments"
      type="text"
      placeholder="Additional comments"
      validation="required"
      label="Additional comments"
      validation-messages="{
            required: "Additional comments are required",
      }"  />
//my custom data model
</FormulateForm>

data () {
    return {
      dataModel: (this.value) ? {label: this.label, value: this.value}
                  : {label: this.label, value: null}
    }
  },

The above works but than it populates the additional comments with object and also validation doesn't work. I want to be able to have a model with label and value in the field so that I can so it in the review page and also the validation to work. I am not sure if that can be achieved through context object? Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant