create editor autofill input fields

create editor autofill input fields

nokonoko Posts: 10Questions: 3Answers: 0

Hi I have a select option which is currently being populated through a join php. Now I want the next two input fields to be automatically populated, as soon as the on change happens & depending on the value chosen. Is that possible ? Ive been wrecking my brains, normally when I don't use Datatables I just use the Jquery onChange event. But I can't seem to find a way to implement it in data tables. Thanks

Replies

  • allanallan Posts: 52,715Questions: 1Answers: 8,069 Site admin

    Hi,

    The title of your post references the AutoFill extension - are you looking to use AutoFill in an Editor form? That is not currently possible - AutoFill will work in a DataTable only.

    For your question, you can use a standard jQuery change event - just use the field().input() method to get the select element and then attach a change event as you would for any normal element.

    Another option is to use the dependent() method which will trigger on value change of the selected field.

    Allan

This discussion has been closed.