Support the ongoing development of Laravel.io →
Input Views Blade

Hello i have an issue when it comes to display my creating product form. The main problem is that i have some fields different from one category to other and i want to display it just with what is needed for a specific category so what i thought is how i can load a partial based on select list. The workflow is: 1. I am selecting the product type 2. I am selecting category 3. the form partial is displayed. Yes i could have done this with jquery hiding and toggling classes with fadeIn and fadeOut but is there a way how this could be performed from the laravel part ?

Last updated 3 years ago.
0

Well, seeing that you want to change the view based on user behaviour on the page; you will need to use JavaScript. If so, the easiest options in my eyes are to either:

  • Only load the necessary items through an AJAX request and append them
  • Hide/Show with jQuery
Last updated 9 years ago.
0

you would still need the ajax/jquery to send the product type & category to a controller which will return you the view which you would have to use jquery/ajax to append/add to the current page..

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.