PFBC provides several properties and methods for facilitating ajax submissions. To get started, you'll first need to set the ajax property in the form's configure method. The ajaxCallback property can also be included in the configure method if you'd like a javascript function to called after the form's data has been submitted. In the example below a callback function has been set to extract the latitude/longitude information from a json response.

The validation process for an ajax submission also differs slightly from that of a standard submission. If the form's isValid method returns false, you will need to invoke the renderAjaxErrorResponse method, which returns a json response containing the appropriate error messages. These errors will then be displayed in the form so the user can correct and resubmit.