select2 dependent dropdown

Questionsselect2 dependent dropdown
german asked 2 weeks ago

select2 dependent dropdown empty value is not shown for the second dropdown.

2 Answers
Abu Ghufran Staff answered 2 weeks ago

Quick solution is to add empty value in sql result using UNION. In parent dropdown, you can set this query for child with UNION. e.g. onchange sql:

“sql”=>”select ” as k, ‘-‘ as v UNION select distinct note as k, note as v from invheader WHERE client_id = ‘{client_id}'”

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
[email protected] answered 2 weeks ago

thank you sir,

 

I have used these methods .this works well.What i need is just default blank or select value at first and then followed by query values.

 

Thank you sir.

Your Answer

16 + 9 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?