Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!