Custom button with in Datatable editor form and accessing all fields from the form

Custom button with in Datatable editor form and accessing all fields from the form

krishna.nayanakrishna.nayana Posts: 2Questions: 1Answers: 0

I have a data table when clicked on new button, it opens a editor with multiple form fields - date, text fields, multi select drop down etc...
Now I have to add a button (refresh) with in the form that will be used to refresh some additional data by calling an api with data filled in editor form. How can I achieve that?

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    This example here shows how you can create your own buttons on the form. You can create one that then updates the fields as you described.

    Colin

  • krishna.nayanakrishna.nayana Posts: 2Questions: 1Answers: 0

    When I click on new entry from data table. Following form currently shows. Now I am planning to add a button with in the form. Button clikc will call an API with all the fields selected/ entered. Here is my sample reference of popup

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Yep, understood, but I'm not clear what the question is. I'm assuming you'll issue an Ajax request and this use the results to set the fields with field().set(). Are you able to code this now, or am I misunderstanding?

    Colin

This discussion has been closed.