I've got a very simple JSON service running on my site where you ask /service?foo=bar and get back a response of {"response":"Yes"} or {"response":"No"}.
I'd like an input field that allows my users to specify a value for 'foo' and a button that makes the request to /service with the value, and displays the response to the user. If the response is Yes, the value for 'foo' needs to be validated and the user allowed to submit the form.
Is this possible with hooks and if so, how do I set it up? Thanks!