Using repeatable field outside of form. #515
-
Hello, Is there a way to use a repeatable field or any field outside of a form? Just render it anywhere on the page we want not necessarily inside the crud form. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @ZakariaBenali At the moment the only possible solution I can think of is publishing the Those files expect some stuff that's setup by the CRUD operations that use forms (create/update), so you need to manually modify the blade to remove stuff that's not needed since you are not using it inside a form. Basically keep only the HTML/CSS/JS needed for the repeatable container to work and display the information you are going to feed it. After that just include that view in your blade files like any other view. It will be a little bit of work I guess, but's doable. At the moment we don't have nothing created to make this easy. We have in roadmap for v6 the creation of a "form helper", that will help you to create operations with forms like the create / update, but still not addressing the usage of the fields outside specific operations. Cheers |
Beta Was this translation helpful? Give feedback.
Hello @ZakariaBenali
At the moment the only possible solution I can think of is publishing the
repeatable.blade.php
and therepeatable_row.blade.php
files into yourresources/views/
.Those files expect some stuff that's setup by the CRUD operations that use forms (create/update), so you need to manually modify the blade to remove stuff that's not needed since you are not using it inside a form. Basically keep only the HTML/CSS/JS needed for the repeatable container to work and display the information you are going to feed it.
After that just include that view in your blade files like any other view.
It will be a little bit of work I guess, but's doable. At the moment we don't have nothing…