0

I am trying to implement two part form at backend where user will provide some key in input field VideoId and based on provided key some api call will be fired (by click on fetch button If I can put or on field focus out event). The result of api call will be the value for other fields on form and also editable (thumbnail url, Title, View Count etc).

Basically it is a autofill based on some api request. I can do this in beforeSave event but I need to show the received data to user before it get saved so He can change if required. Any direction to look?

Natwar Singh
  • 2,197
  • 4
  • 26
  • 42
  • you can add `partial as field` [https://octobercms.com/docs/backend/forms#field-partial] now `inside partial you can add your input and button` and use `october ajax api` in `controller you can add handler`. It will `handle request` and you can `return json data`, when data come back you can use that data to fill input fields. – Hardik Satasiya Dec 21 '18 at 12:08
  • 1
    Thanks, got the point. – Natwar Singh Dec 21 '18 at 18:54

0 Answers0