联系表格问题。需要帮助! [英] Issue with contact form. Need help please!

查看:71
本文介绍了联系表格问题。需要帮助!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎可以通过我的联系表单上的提交按钮将表单发送到电子邮件地址。任何人都可以帮忙吗?



I can;t seem to get the submit button to work on my contact form to send the form to an email address. Can anyone help?

<div class="page-width">
  <div class="grid">
    <div class="grid__item medium-up--five-sixths medium-up--push-one-twelfth">
      <div class="section-header text-center">
        <style>
     
        </style>
                <h1>{{ page.title }}</h1>
      </div>
      {% if page.content.size > 0 %}
        <div class="rte">
          {{ page.content }}
        </div>
      {% endif %}

      <div class="contact-form form-vertical">
        {% form 'contact' %}
<div class="position_content" id="widgetu94_position_content">
<style>
     .column {
      float: left;
      width: 50%;
    }
    /* clear floats after the columns */
    .row:after {
      content: "";
      display: table;
      clear: both;
    }
.form-wrapper .field-list .field {
  position: relative;
  margin: -20px 0px 24px;
}
    </style>
  
    <div class="row">
      <div class="column" id="column_gap">
       <div>
      <label for="text">First Name:</label>
      <input type="text" id="first name" maxlength="10" required>
      </div>
      <div>
        <label for="text">Company:</label>
     <input type="text" id="company" maxlength="20">
        </div>       
      </div> 
      <div class="column" id="column_gap">
      </div>
 <div class="column" id="column_gap">
   <div>
    <label for="text">Last Name:</label>
    <input type="text" id="last name" maxlength="10" required>
    </div>
<div>
      <label for="text">Phone Number:</label>
    <input type="text" id="number" maxlength="12" required>
    </div>
      </div> </div>
  <div>
    <label for="text">Email Address:</label>
    <input type="text" id="email" maxlength="30" required></div>
<br><br>
      <div class="row">
      <div class="column" id="column_gap">
       <div>
      <label for="text">Rod Diameter (mm):</label>
      <input type="text" id="rod diameter" maxlength="5">
      </div>
      <div>
        <label for="text">Stroke (mm):</label>
     <input type="text" id="stroke" maxlength="5">
        </div>       
              <div>
        <label for="text">Extended Length (mm):</label>
     <input type="text" id="ex length" maxlength="5">
        </div>
      </div> 
 <div class="column" id="column_gap">
   <div>
    <label for="text">Tube Diameter (mm):</label>
    <input type="text" id="tube diameter" maxlength="5">
    </div>
<div>
      <label for="text">Closed Length (mm):</label>
    <input type="text" id="cl length" maxlength="5">
    </div>
      <div>
    <label for="text">Force Required (N):</label>
    <input type="text" id="force" maxlength="5">
    </div>
        </div> </div>

  <style>
    .column_gap {
      -webkit-column-count: 2;
      -moz-column-count: 2;
      column-count: 2;
      -moz-column-gap: 2em;
      -webkit-column-gap: 2em;
      column-gap: 2em;
    }
    .column {
      float: left;
      width: 50%;
    }
    /* clear floats after the columns */
    .row:after {
      content: "";
      display: table;
      clear: both;
    }
    </style>
  
    <div class="row">
      <div class="column">
    <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
      <input type="checkbox" id="checkbox">
      <label for="checkbox">Extended Gas Spring</label>
    </div>
      <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
            <input type="checkbox" id="checkbox">
      <label for="checkbox">Standard Build</label>
    </div>
          <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
      <input type="checkbox" id="checkbox">
      <label for="checkbox">Stainless Steel 316</label>
    </div>
          <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
            <input type="checkbox" id="checkbox">
      <label for="checkbox">Locking External (with Cover)</label>
    </div>
              <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
      <input type="checkbox" id="checkbox">
      <label for="checkbox">Locking Internal (Lever)</label>
    </div>
              <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
<input type="checkbox" id="checkbox">
      <label for="checkbox">Adjustment Valve (Side)</label>
    </div>
                  <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
                    </style> </div> </div>
                            <div class="column">
    <div class="inline-field">
            <input type="checkbox" id="checkbox">
      <label for="checkbox">Compress (Traction)</label>
    </div>
          <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
    <input type="checkbox" id="checkbox">
      <label for="checkbox">Stainless Steel 304</label>
    </div>
      </div>
      <div class="column">
          <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
   <input type="checkbox" id="checkbox">
      <label for="checkbox">Locking Internal (Button)</label>
    </div>
              <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
      <input type="checkbox" id="checkbox">
      <label for="checkbox">Locking Internal (Own)</label>
    </div>
              <div class="inline-field">
      <style>
        .inline-field input,
        .inline-field label {
          display: inline-block;
          margin-bottom: 0;
          vertical-align: middle;
        }
      </style>
      <input type="checkbox" id="checkbox">
      <label for="checkbox">Adjustment Valve (Enclosed)</label>
        </div></div></div>
   <br>
       <div>
    <label for="text">End Fitting Requirements:</label>
    <input type="text" id="requirements" maxlength="300"></div>
     <div>
    <label for="text">Special Requirements:</label>
    <input type="text" id="sprequirements" maxlength="300"></div>
  
      </div> 
      <button class="submit-btn NoWrap rounded-corners clearfix colelem" id="u96-4" data-muse-temp-textContainer-sizePolicy="true" data-muse-temp-textContainer-pinning="true" type="submit" value="Submit" tabindex="25"><!-- content -->
       <div style="border-radius: 8px; height:11px; width: 200px; height: 25px; text-align= center; text-align= middle; ">
        <p>Submit</p>
       </div>
          {% if form.posted_successfully? %}
            <p class="note form-success">
              {{ 'contact.form.post_success' | t }}
            </p>
          {% endif %}


        {% endform %}
      </div>
    </div>
  </div>
</div>





What I have tried:



Tried different types of contact form, but this is the only one I could build that had the correct layout I wanted.



What I have tried:

Tried different types of contact form, but this is the only one I could build that had the correct layout I wanted.

推荐答案

The code you posted does not contain any form.. so it will not work like a form and it will not generate action type postback.. and you can’t sent email without server side language like php or asp or c#.. if you are using html with php then try something like this:



The code you posted does not contain any form.. so it will not work like a form and it will not generate action type postback.. and you can't sent email without server side language like php or asp or c#.. if you are using html with php then try something like this:

<?php
    if(isset(


_POST[’name’]))
{
_POST['name'])) {


name = trim(
name = trim(


这篇关于联系表格问题。需要帮助!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆