WebBasic CMS
References

ajax-mail

ajax-mail - sending form on email

To post form data to an email the send button, you must assign the attribute data-wb-ajax="/ajax/mail". The form data is serialized, passed to the handler that sends the data by email, written in _SETT[email].

Ajax handler returns a JSON string, 
{error:false} - if the message sent
{error:true} - if the message sending failed

<form>
<div class="form-group">
   <input class="form-control mb-1" type="text" name="yourname" placeholder="Your name" required>
   <input class="form-control mb-1" type="phone" name="phone" placeholder="Phone" required>
   <button class="btn btn-primary" data-wb-ajax="/ajax/mail">Send</button>
</div>
</form>