Editor, lookup field and display read-only.
Editor, lookup field and display read-only.
MickB
Posts: 103Questions: 25Answers: 2
I have a Datatable which I want to use for data entry.
I want the users to choose a product_id (eventually will be a Select2 which is populated from the products table), the system will then lookup the product_description (30,000 records).
I just want the description to be displayed, so the user can check they have entered the correct product_id.
The description does not need to be saved to the table, just the product_id.
Is there anyway to do this?
Cheers,
Mick
This discussion has been closed.
Answers
You could use
readonly
or the display plug-in (which I've actually been thinking about rolling into Editor's core).Allan
Great. How can I get that to update, with the correct description when the product_id has been selected?
You'd need to set the value of the field. Probably the best way of doing that (i.e. knowing when the product_id has changed) is to use the
dependent()
method. Alternatively usefield().input()
to get theselect
element so you can bind your own event listener.Allan