⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

"Add new" in dropdown list (Set Relation)



dmanolias

dmanolias
  • profile picture
  • Member

Posted 11 November 2020 - 17:29 PM

see below


dmanolias

dmanolias
  • profile picture
  • Member

Posted 11 November 2020 - 17:29 PM

Hey everyone,

 

First of all, I want to mention that I am a beginner, trying to figure out some things to make my own project for my small business. I am using Grocery Crud Enterprise with Codeigniter 3.

 

So, my question is whether there is an easy way to add a function, so you can add a new record to a dropdown list without going to the secondary table.

 

EXAMPLE:

 

I have two tables. Income and Type. There is a foreign key between those two tables in the column Type_id.

 

When I add a new Income, I search the Type_id in the dropdown list. If there is not the type that I want, I would like to add a new type, which will be saved in the Type Table as well, without having to visit the Type Table at all.

 

By using a "Add new" button in the dropdown list.

 

P.S. I know that this thread exists (/topic/364-answered-set-relation-and-add-new-button-to-quick-insert/#entry1458), but because I am a beginner I cannot really make it work)

 

P.S.2   It would be REALLY HELPFUL, if you could help me add this function to my project, by recommending a new way to do it, or by helping me find which paths and names I have to change from the #4 post of the thread that I attached above)

 

 

Thanks in advance! Please help  :)