Toggle menu

Using the Ajax Field

Here were calling the same end point as the Basic Browser Calls example, but the call is made using the API Server AJAX field. This then passes the response to the guidance text field at the bottom of the form.

The field is set to be triggered whenever the value of any field it references changes. In this case it will make an AJAX call when the TEXT field changes, and pass the value of that field to the end point.

As with the previous example, this all happens in the user's browser so is completely insecure. It should be used with caution and in a very limited way, as any data you are retrieving from the end point could be accessed by anything on the internet.

The form itself only has three fields:

Ajax Field Form
 

The Ajax field calls the worker/end point:

Ajax Field
 

And its handler updates the guidance text:

Update on Field Change
 

This example is basically the same as the previous one, but using the Ajax field means you don't have to write any script functions, the field does it all for you.

 

Share this page

Facebook icon Twitter icon email icon

Print

print icon