Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Metronic v8 form validation and repeater


Hi,

My goal is to have a dynamic adding(append) of input field and include validation. I am using the form repeater and validation plugin to achieve this goal. However, I am getting an error every time I execute the "addField" function of the validation plugin.

This is my JS code:
fv.addField("order_item["+inc+"][item]", textValidator);


Error:
plugins.bundle.js:64 Uncaught TypeError: Cannot read properties of null (reading 'classList')
at plugins.bundle.js:64:159273
at Array.forEach (<anonymous>)
at plugins.bundle.js:64:159250
at plugins.bundle.js:64:159390
at Array.forEach (<anonymous>)
at z (plugins.bundle.js:64:159195)
at f.value (plugins.bundle.js:64:167464)
at plugins.bundle.js:64:167269
at Array.forEach (<anonymous>)
at f.value (plugins.bundle.js:64:167239)

Please revert back for the fix of this error. Thank you and looking forward to your quick response.


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,

Please add "fv-row" class to the input's parent as FormValidation depends on these settings to display the error messages.

For more info please refer to the FormValidation plugins integration guidelines

Regards.



Hi Sean,

Thank you very much for your help. It works!



Great! Glad to help you out happy


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  :(