Jump to content
  • 0

Call Api And Populate Response From Module Options


AllToolKits.com

Question

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?

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...