0

I am creating admin form using template I have multiple select dropdown. I want to filter dropdown based on the value of other but problem is how i can assign the javascript value to php variable so that i can send the id to the function in block and it send me the filtered collection for another select dropdown

enter image description here

All the dropdown collections is coming from Block (methods). I want to filter Level From and Level To dropdown based on the selected value of Color Code Dropdown ,Now I can easily get the value of selected dropdown using jquery how i can pass that value to php so that i can filter the respective dropdown accordingly.

Please help Thanks in Advanced !!

1 Answer 1

0

You could do it on reverse, passing php data as options to a custom js AMD module so that it's all handled via js.
Add listeners to each dropdown and based on the value selected render the options of the next dropdown..
I don't know if there's a better way, but it's an idea.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.