Jump to content

90_mati

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by 90_mati

  1. Hello

     

    I have problem with my contact form :/ I dowload some script in JS and HTML. I chang somevaluean all it's ok. ActuallyI have only good looking form but nothing else. I am traying erite something in php, but it's not work. I started with some easy examples...

     

    Details behind

    <? extract($_POST);mail("myemail@gmail.com", "teaamat", $textarea);?> 
    var form = $('#contact'),    submit = form.find('[name="submit"]');form.on('submit', function(e) {  e.preventDefault();    // avoid spamming buttons  if (submit.attr('value') !== 'Send')    return;    var valid = true;  form.find('input, textarea').removeClass('invalid').each(function() {    if (!this.value) {      $(this).addClass('invalid');      valid = false;    }  });    if (!valid) {    form.animate({left: '-3em'},  50)        .animate({left:  '3em'}, 100)        .animate({left:    '0'},  50);  } else {    submit.attr('value', 'Sending...')          .css({boxShadow: '0 0 200em 200em rgba(225, 225, 225, 0.6)',                backgroundColor: '#ccc'});    // simulate AJAX response    setTimeout(function() {      // step 1: slide labels and inputs      // when AJAX responds with success      // no animation for AJAX failure yet      form.find('label')          .animate({left: '100%'}, 500)          .animate({opacity: '0'}, 500);    }, 1000);    setTimeout(function() {      // step 2: show thank you message after step 1      submit.attr('value', 'Thank you :)')            .css({boxShadow: 'none'});    }, 2000);    setTimeout(function() {      // step 3: reset      form.find('input, textarea').val('');      form.find('label')          .css({left: '0'})          .animate({opacity: '1'}, 500);      submit.attr('value', 'Send')            .css({backgroundColor: ''});    }, 4000);  }});
       <section id="contact-form">                 <h2>Contact</h2>                                                      <form method="POST" action="contactform.php">                                               <label><span>Name</span><input name="name" type="text" placeholder="Name"/></label>                  <label><span>Email</span><input name="email" type="text" placeholder="Email"/></label>                  <label><span>Message</span><textarea name="message" placeholder="Message"></textarea></label>                  <input name="submit" type="submit" value="Send"/>                 </form>                 <aside>                  <div id="mapa"></div>                 </aside>               </section>
×
×
  • Create New...