Skip to content
Advertisement

The second dropdown value for multiple dropdown value NOT SAVE in database using laravel

Hye everyone! First of all, my coding all about dynamic dropdown value, the issues now is the second dropdown value is not save inside the database. Which part did I missed or wrong?

View:-

JavaScript

View for second dropdown using jquery script:-

JavaScript

Controller:-

JavaScript

Routes:-

JavaScript

Advertisement

Answer

The issue is with option value wrongly passed in jquery.It should be data[i].code instead of data[i].id

JavaScript

Also you might need to update query as well to show description

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement