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
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"
],
},
\assets\plugins\global\plugins.bundle.js
built with form validation wizard pluginThank 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.