alpes.one.forms
This documentation describes how to integrate a form with alpes one beta service.
Adding the script
Add the following script to your page, right after the jQuery.
<script src="//alpes.one/js/alpes.forms.func.js"></sript>
Sending the form data
On the submit of your form (can be inside a custom function or in an onClick of a button), call the function:
// inside your current form sending function ...
sendFormToAlpes(selector, formIdentification);
Where the params are:
selector
: the jQuery selector for the form you wish to send. Ex:#form-home
,.forms .form-lp
. The function will call the serialize() method of the forms and send the data to alpes servers.formIdentification
: A code that identifies your form between all the forms of your site. Ex:form-home
,form-lp
,form-contact-footer
Form fields
Alpes beta allows you to send any forms field you want (with any name). Some fields are mapped to better display and all of non-mapped fields are displayed as "Extra fields".
The current mapped fields are:
- nome
- telefone_celular (pode ser enviado junto com o ddd, ou separado conforme campo abaixo)
- ddd_telefone_celular
- mensagem
- unidade
- assunto
- segmento
- servico
- cpf
- cnpj
- produto
- estado
- cidade
- telefone_residencial
- ddd_telefone_residencial
and many others not applied here... See input names
section in the hub.alpes.one
Manual integration
If you have any problem or limitation with the script, you can send the data manualy.
To do that, send a post request to the url:
https://hub.alpes.one/api/v1/leads
The required params are:
meio_captacao
: The form identificationhost
: the current wensite host. You can send withwindow.location.host
and of course, the form fields data, such as name
, email
, phone
, ...