Selection of first dropdown determines second dropdown

QuestionsSelection of first dropdown determines second dropdown
Rudolf Wagner asked 2 years ago

Hello Abu,

I still need help. I managed to build the grid as desired: During the process of adding a new record, when I select a customer in the first dropdown only the jobs of this customer are shown in the second dropbox. When the input is finished the grid seems ok.

But when I update the browser all job entries disappear. The data in the database is not touched since I use IDs. But nevertheless this is not as expected. I guess I didn’t really understand the correct application of the event triggers. Sorry

Can you have a look into this?

Kind regards,
Rudolf

Here is my code (with focus on line 87-115):

gistfile1.txt

2 Answers
Rudolf Wagner answered 2 years ago

I don’t want to be too pushy, but is there really no one who can help me with this problem? Or is there still a lack of information from my side?

Kind regards,
Rudolf

Abu Ghufran Staff answered 2 years ago

On line 112, Try adding:

$str = $g->get_dropdown_values("select pk as k, Bezeichnung as v from Auftraege");
$col["editoptions"]["value"] = $str,

To fill the list, you will need all key:value mappings but when you provide an [“onload”][“sql”] query, it limits them to your where condition for edit/add dialog.

Hope it solves your case and apologies for the late reply.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

4 + 12 =

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?