Webflow form external server response for success

Hi,

We are trying to use the Webflow form to capture data on our server. We can successfully post the form and its values and process things on server.

When we set the form action to use Webflow, we notice that the server response from the POST is a JSON object { msg = “ok”, code = 200}, and the dialog saying “submit was successful” is shown.

When we return the same JSON object from our server, it does not get processed and the dialog for a successful submit is not shown.

What else do we need to do in order to indicate back to the form that the submit was a success?