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

How do you enable Form tool? #29

Open
mlanders opened this issue Feb 24, 2021 · 2 comments
Open

How do you enable Form tool? #29

mlanders opened this issue Feb 24, 2021 · 2 comments

Comments

@mlanders
Copy link

Having an issue getting forms to work with the Vue component. Does it need to be in display mode web, or is it supported in email?

The documentation show enabling forms as the following.

unlayer.init({
  tools: {
    form: {
      enabled: false
    }
  }
});

However when trying to enable it via the tools props it doesn't show up.

<EmailEditor ref="documentEditor" :options="options" :tools="tools" @load="editorLoaded" />

The following is from the example which also does not work.

      tools: {
        form: {
          properties: {
            action: {
              editor: {
                data: {
                  actions: [
                    {
                      label: "Marketing",
                      method: "POST",
                      url: "http://whatever.com/marketing-form-submission",
                    },
                    {
                      label: "Sales",
                      method: "POST",
                      target: "_blank",
                      url: "http://whatever.com/sales-form-submission",
                    },
                  ],
                },
              },
            },
          },
        },
     }
@mlanders
Copy link
Author

Got it to work by modifying the display mode in the package and rebuilding it.

@mlanders
Copy link
Author

mlanders commented Feb 24, 2021

Got a PR in for this #30

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