Creating/Editing dropdown values
Creating/Editing dropdown values
I am using the datatables Editor. I have a very large table with many columns. I have set it up with some invisible columns, but a user can get to all columns of a row when clicked. This table is in a php file. Some dropdown columns in the table use other tables for the values. Each of those tables also reside in a php file and have their own individual php route/Editor instance builder file. All tables have distinct names to avoid initialization problems. Each individual php table displays correctly in the browser including the big table.
Here is the problem I have encountered:
_
First Attempt_: I added modal buttons (in their own div) to the bottom of the php page with the big table to display each of the small tables used for dropdown values in the big table. When the modal buttons were added, the big table would no longer display. Firefox debugger shows an exception was thrown stating the big table does not exist. If I remove the modal button without making any other changes, the big table is displayed correctly. The tables (each in a separate php file) display correctly in each of the modal dialog boxes when the button is depressed. However, when the create or edit buttons are depressed, the pop up appears behind the modal where I can’t see them until the modal is closed. Of course, there is sql error if you try to update or add to the table after the dialog is closed. I tried experimenting with the z-index, but had no luck.
Second Attempt: Instead of using the modal button, I put each of the smaller tables (php file) in a CSS accordion panel in the same php file as the big table at the bottom. Each of the smaller tables displayed correctly and the buttons worked correctly for adding and updating. I was able to open as many and close as many panels as desired with no display problem. Unfortunately, the big table had the same problem as above and the browser thinks it does not exist. If I remove the accordion, as above, the big table displays correctly.
The reason I need to have these tables available when the big table is displayed is to allow the user to add or change data in the smaller tables so that new values or modified values can be selected via the dropdown in the big table. My preferred method would be to use the modal buttons.
Can anyone advise me on how to get this to work. If there is another way to add new values to an existing dropdown columns or edit existing values in the dropdown, please advise while populating a table.
Answers
Are you able to give me a link to your page for attempt 1? That sounds like it should work in principle and I can take a look to see what you are getting an error about the table not existing.
Allan
I am unable to share this publicly right now.
Can you send it to me direct? You can PM me by clicking my name above and then "Send message".
Allan