Can't submit the form after checking the input fields



I have created the checks of the input field of the pocketbook project.
when I submit the form the checks work and the messages appears above the right field.

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
When I submit the form again after correcting the error in the form, the form doesn’t submit anymore.
the create account button doesn’t respond to any clicks anaymore
is this normal or can anyone point out what I’m doing wrong?


var main = function() {
('form').submit(function() { var firstName = (’#first’).val();
var lastName = ('#last').val(); var email = (’#email’).val();
var password = $(’#password’).val();

if(firstName === “”) {
$(’.first-name-error’).text(“Please enter your first name”);

 if(lastName === "") {
$('.last-name-error').text("Please enter your last name"); 

 if(email === "") {
$('.email-error').text("Please enter your email address"); 

if(password === "") {
$('.password-error').text("Please enter a password."); 
} else if(password.length < 8) {
$('.password-error').text("Short passwords are easy to guess. Try one with at least 8 characters.");
	return false; 




<do not remove the three backticks above>


Could you provide the HTML code you are using…


Hi Leonard,

<!doctype html>
<link href='' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="">
<link rel="stylesheet" type="text/css" href="style.css">
<div class="header">
  <div class="container">
    <img src="" width="50">

<div class="main">
  <div class="container">
    <div class="row">
      <div class="col-md-7">
        <h1>Join Pocketbook</h1>
        <form role="form">
          <div class="form-group">
            <label for="first">First name</label>
            <p class="first-name-error"></p>
            <input type="text" class="form-control" id="first">
          <div class="form-group">
            <label for="last">Last name</label>
            <p class="last-name-error"></p>
            <input type="text" class="form-control" id="last">
          <div class="form-group">
            <label for="email">Email</label>
            <p class="email-error"></p>
            <input type="email" class="form-control" id="email">
          <div class="form-group">
            <label for="password" class="password-label">Password</label> 
            <p class="password-error"></p>
            <input type="password" class="form-control" id="password">
          <button type="submit" class="btn">Create account</button>

<div class="footer">
  <div class="container">
      <li>Help Center</li>
<script src=""></script>
<script src="app.js"></script>


after a chat with the support team form codecademy the conclusion:
my code works fine but there are no further actions after the submitting the form. and thats why looks like nothing happens.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.