Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

162
Visualizações
Meteor form textbox dont clear after submit

I am running Meteor 1.4 and i try to cler the textbox with the submit button i already red every blog post about this problem but nothing is fixing it

Here is my HTML

<template name="NeuesEvent">
     <head>
    <title>Event_Planner</title>
  </head>

  <body>
    {{> NavBar}}

        <form class="add-event" >
            <input type="text" name="name" placeholder="Event Name" />
            <input type="submit" value="Bestätigen" />
        </form>

  </body>
</template>

and this is the js

Template.NeuesEvent.events({
    "submit .add-event": function(event){
        var name = event.target.name.value;

        Events.insert({
            name: name,
            createdAt: new Date()
        });

        event.target.text.value = "";

        return false;
    }
});

everything is in the right folder and works fine only the clear function doesnt work help is really appreciated Thanks ;)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This could possibly just be a typo:

Try this code:

Template.NeuesEvent.events({
    "submit .add-event": function(event){
        var name = event.target.name.value;

        Events.insert({
            name: name,
            createdAt: new Date()
        });

        event.target.name.value = "";

        return false;
    }
});

Changed the line event.target.text.value = ""; to event.target.name.value = "";

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda