F
Filament15mo ago
Roberto

Results in a table

i have a text box and a button. when i click on button it should display a table of some data (not from the database) how do i do that? do i need to create custom page or livewire component?
8 Replies
cheesegrits
cheesegrits15mo ago
In what context do you have a text box and a button? On a form? Do you want to open your table in a modal, or its own page?
Roberto
RobertoOP15mo ago
yes, i have text box and buton on a form. i want to display in on its own page
cheesegrits
cheesegrits15mo ago
Do you need to pass any data to the page based on the form / button that was clicked?
Roberto
RobertoOP15mo ago
here is my usecase. user enter his website/url in textfield and a button that says "fetch urls" when user clicks on fetch urls button it should call a backend function that fetches all urls of a given website and displays all of those urls in a table user select which urls they want from the table and submit the form then form saves and urls into another database table
cheesegrits
cheesegrits15mo ago
Any particular reason you want to open your URL selection in another page? That's going to make things really difficult, if you are navigating away from the form you then want to submit. How many URL's (ballpark) would be involved? Like, how many options to choose from? And how do you see editing an existing record working? Would you want to show the URL's that have been previously selected?
Roberto
RobertoOP15mo ago
i want to achive this functionality. this is my competitors website
cheesegrits
cheesegrits15mo ago
Yes, that would be possible, without needing to leave the form page. It won't be trivial, though. The hardest part would be building a paginated checkbox selector (which is why I asked how many URL's you'd need to choose from). Would probably need to create your own custom Field, which could also handle the progress feedback. The "Step 2" stuff would be relatively easy, as that could just be a standard Filament Repeater with a relationship to the table you insert the selected URL's in to. And the rest is using Actions to kick things off, and hide / show fields. However ... it's probably outside the scope of #help. IMHO, it'd take a couple of days work for someone fairly experienced with Filament / Livewire to build.
Roberto
RobertoOP15mo ago
ok thank you for your insight
Want results from more Discord servers?
Add your server