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
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 pluginRegards.
Thank you for your answer. I found a workaround so I didn't have to add the Wizard plugin.
Hi
,
Great! Anyways if you need any further help please let us know.
Regards.