-1
Good night!
I developed a form, with help from other users here, to send new records to a client’s CRM system. When we send, the data reaches the CRM, but the browser accuses the error message. I’ve run some tests, but I can’t understand what could be wrong.
My form code is as follows::
<form id="formulario" action="" method="get">
    <input type="hidden" id="unidade" name="unidade" value="XXX">
    <input type="hidden" id="chave" name="chave" value="XXX">
<div width="100%">
    <input type="text" id="nome" name="nome" class="campos" placeholder="Seu nome" required>
</div>
<div width="100%">
    <input type="text" id="email" name="email" class="campos" placeholder="Seu e-mail" required>
<div width="100%">
    <input type="tel" id="telefone" name="telefone" class="campos" placeholder="Seu celular" required>
</div>    
<div width="100%" class="motivo">
    <select id ="observacoes" name="observacoes">
    <option value="Selecionar">----- Selecione uma das opções</option>
    <option value="Concurso e vestibular">Concurso e vestibular</option>
    <option value="Inteligência">Inteligência</option>
    <option value="Memória">Memória</option>
    <option value="Profissional">Profissional</option>
    <option value="Alzheimer">Alzheimer</option>
    <option value="Ansiedade">Ansiedade</option>
    <option value="Atenção">Atenção</option>
    <option value="Estresse">Estresse</option>
    <option value="Estudo">Estudo</option>
    </select>
</div>
<div width="100%" align="center">
    <button onClick="form()" id="enviar" name="enviar" type="submit" class="btn-enviar">Enviar</button>
</div>
</form>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
    $(function form () {
        $("#formulario").on('submit', function (event) {
            var nome = $("#nome").val();
            var email = $("#email").val();
            var telefone = $("#telefone").val();
            var observacoes = $("#observacoes").val();  
            var unidade = $("#unidade").val();
            var chave = $("#chave").val();
            $.get( `https://crm4u.azurewebsites.net/api/Android/PutLead/${nome};${email};${telefone};${observacoes}/${unidade}/${chave}/`)
            .done(function( data ) {
                alert("Sucesso");
            })
            .fail(function() {
                alert( "Erro" );
            })
            event.preventDefault();
        });
    });
</script>
The page is as follows: https://superaguaruja.com.br/teste/
Does anyone have any idea what might be going on?
Thank you!
Lucas, thank you for the direction! I will do some tests here, and in parallel I will signal to the CRM staff this issue.
– Luiz Francisco Fonseca