Now in the Expense tables _form.php ,if i select the expense_name from the dropdownlist then the corresponding expense_code must be displayed as a non-editable field and must go into the Expense table.
I’m sorry but I don’t understand good your question
first, you talk about 2 tables so I thought you wanted 2 dependent dropdown
dependent dropdownlist
but then, you say
so I think you have only one dropdownlist … when you say "… must be displayed as a non-editable field" what do you mean?? cuz the dropdownlist is a non-editable list
When you say "…and must go into the Expense table" do you want an insert into the DB when you select an item??
The dependent drop-down list question was posted as a separate topic by me. In this topic i just wanted to display a value in the database depending on the selected value of the drop-down list .
As you said in this topic there is just one drop-down list . Now depending on the expense-name that i select the corresponding expense-code must be shown to the user as a non editable text-field and must be entered into the database.
I was trying to use Eager Loading for this issue. I saw code which looks like this