The New Way to Build with AI! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Browse ReUI Pro

Form Repeater giving error "$(...).repeater is not a function"


Dear support,
We are using Metronic Laravel Demo 8.0.37. We include repeater.js in global pages config
"plugins/custom/formrepeater/formrepeater.bundle.js", when we try to use in JS its giving "$(...).repeater is not a function" error. We also try to include it in plugin.js but the result is same. We also add
window.$ = require('jquery');
require('jquery.repeater');

in "resources/assets/core/plugins/custom/formrepeater/formrepeater.js"

But still result was same.

Please help us to resolve this issue.

Thanks


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)

 
Deleted comment

Hi Margalla,

By default, Webpack adds a code wrapper for modular and this will cause the issue. For the below file, could you please try to change it as below? This will change the way of the build and the bundle file content.

resources/assets/core/plugins/custom/formrepeater/formrepeater.js


[
"node_modules/jquery.repeater/jquery.repeater.js"
]


Rename the file formrepeater.js to formrepeater.js.json

Thanks



Hi Margalla,

I had this same issue. Unfortunately, the only way I could get it to work was adding it directly in the base.blade.php before the closing </body> tag.

Line -

<script src="{{ asset("demo1/plugins/custom/formrepeater/formrepeater.bundle.js") }}"></script>


I believe the reason it is saying it is not a function is it has to be loaded after JQuery ,but I may be wrong.



Hi Eric,
Thank you for your reply. I tried this solution also but still the result is same. I am getting same error.


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  :(
buy metronic keenthemes mega bundle

ReUI

Open-source React components, blocks and templates built on shadcn/ui and Tailwind CSS by Keenthemes.