Jump to content
  • 0

Call Api And Populate Response From Module Options


Question

Posted

Hi,

When creating a package,  in  Module Options  section,  i have a server drop down with name of the server in it.

 

On selecting a server, i must be able to call some api with the server details and the response i get should display in text boxes in the   Module Options  section under the server dropdown. How i can do it?

 

1 answer to this question

Recommended Posts

  • 0
Posted

You can handle that through Module::getPackageFields. Use jquery to make an AJAX request to refetch module options when the selected server changes, then make your remote API request, and update the module fields returned by that method to contain the updated details. Other modules do this as well, so you could take a look at SolusVM or VPS.net as an example.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...