Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

How to integrate FormValidation's external plugins with Metronic?


I'm working on a Wizard form using the Metronic framework. Metronic includes the FormValidation library, and states so in their website (https://preview.keenthemes.com/html/metronic/docs/forms/formvalidation/overview)

In my project I can find the file in \assets\plugins\global\plugins.bundle.js

However, FormValidation has two groups of plugins: Core and External, as you can see here ( I think Metronic only includes the Core ones, and I need to include an External one as well, namely, the Wizard one.

How can I do this?

In the Metronic site it's stated that they are already included, and in the FormValidation site they refer to a directory structure that's different than the one I have.

Is there a way to include FV's External Plugins to Metronic?

Right now I'm getting "FormValidation.plugins.Wizard is not a constructor" as an error in the console.

Thank You


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi,

May I know which Metronic version are you using ?

To add a formvalidation plugin into your build you just need to modify core/html/tools/gulp.config.js as shown below:


formvalidation: {
styles: [
"{$config.path.common_src}/plugins/@form-validation/umd/styles/index.css",
],
scripts: [
"{$config.path.node_modules}/es6-shim/es6-shim.js",
"{$config.path.common_src}/plugins/@form-validation/umd/bundle/popular.min.js",
"{$config.path.common_src}/plugins/@form-validation/umd/bundle/full.min.js",
"{$config.path.common_src}/plugins/@form-validation/umd/plugin-bootstrap5/index.min.js",
"{$config.path.common_src}/plugins/@form-validation/umd/plugin-wizard/index.min.js"
],
},


And then you will generate the assets using gulp tools as stated in the docs here to have the \assets\plugins\global\plugins.bundle.js built with form validation wizard plugin

Regards.



Thank you for your answer. I found a workaround so I didn't have to add the Wizard plugin.



Hi happy,

Great! Anyways if you need any further help please let us know.

Regards.


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(