jonseg / crud-admin-generator

An open source tool to generate a complete backend from a MySql database.
http://crud-admin-generator.com/
MIT License
1.43k stars 441 forks source link

Creating drop down for a number of fields based on same table #116

Open mredmundto opened 7 years ago

mredmundto commented 7 years ago

Hello

This is a great tool. Many thanks for creating that.

I am trying to generate the drop down based on a number of fields referring the same table. Just wonder if there is a way to

E.g., attribute table we have Id: 1, name: sweet Id: 2, name: sour

In the other table I will have attribute1, attribute2, attribute3.

I can create a drop down table using attribute_id, but if I want to create a table using attribute1, 2 and 3 referring to the attribute table. Is that a good way?

I hope this is clear and many thanks, Edmund

blag001 commented 7 years ago

if you're after "how can I choose the displayed field" over a FK_id, take a look at my commit to this project (merged on the master) :

https://github.com/jonseg/crud-admin-generator/commit/40324ed290687854799358e306c6fa0cadf7b393