Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

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 (https://formvalidation.io/guide/plugins/). 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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • 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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(