Wednesday, March 1, 2017

Reusing Laravel forms, hiding and showing inputs

I have a form partial that I am using for creating and updating users. If I select an account type from a drop down, I want to be able to hide and show inputs based on what is selected. Is there a way to do this? I was trying to use jquery's on change function, but since there will be multiple forms populating in hidden modals for editing users, I can't really do an ID specific selector and classes don't seem to work. Does anyone have any suggestions?




via Paige Meinke

Advertisement