Conditionally generate add dialog

QuestionsConditionally generate add dialog
Jeremy asked 8 years ago

So far this grid has been easy to use and very powerful.

I have a relational db setup, so for example, contacts and organizations. The contact table has an organization_id field and I was able to very easily make that show as a combo-box displaying the field.

But now I want to go a step further. I have set the first entry for organization, id=0 and name = "Create New". So if the user selects this "fake" organization, I want to immediately generate an Add dialog so they can type in the fields for the new organization. Once they "save" on that dialog, the newly generated (auto-incremented by db) organization_id should be saved to that contact row.

I've been looking thru all of the conditional examples and I'm not really seeing a way to use the built-in functionality to achieve this – at least not without a whole lot of complexity with js and lots of back/forth callbacks. But I figured I would check to see if there was some relatively straight-forward way to do this before I started going in to expand the source of the dbgrid itself to implement this.


4 Answers
Abu Ghufran answered 8 years ago

No perfect pre-built solution yet.

I am working on a demo for you that will need minimal work.

On +, it will open a fancy box (iframe page) and on close fancybox it will reload the entries.

Jeremy answered 8 years ago

Oh – Excellent.

*Definitely* getting my money's worth out of this product. Looking forward to the demo. I might actually be on schedule for this project 🙂

Thank you!

Jeremy answered 8 years ago

Hello –

Just checking to see if there's updates to the demo. Thanks!

Abu Ghufran Staff answered 4 years ago

Just to log a missing update, solution to this query is provided in following ticket:

Abu Ghufran - Dev Team
Grid 4 PHP Framework
Your Answer

2 + 14 =

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?