Jump to content

Contact Form [new fields] PS 1.7.6


Recommended Posts

Hi,

i make a new Contact form with new fields, my problem is not working Can you someone explain how is work contact form in PS 1.7.6.

My code

<form class="p-10 px-12 border border-gray-300 rounded-md" action="{$urls.pages.contact}" method="post" {if $contact.allow_file_upload}enctype="multipart/form-data"{/if}>

  <div class="flex flex-wrap -mx-3 mb-6">
    <div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
      <input class="my-8 appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 leading-tight focus:outline-none focus:bg-gray-100" type="text" name="company" placeholder="Nom de la Société *" aria-label="Nom de la Société *">
      <div class="flex flex-wrap -mx-3 my-8">
        <div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
          <input class="appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 leading-tight focus:outline-none focus:bg-gray-100" type="text" name="first_name" placeholder="Votre Nom *" aria-label="Votre Nom *">
        </div>
        <div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
          <input class="appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 leading-tight focus:outline-none focus:bg-gray-100" type="text" name="last_name" placeholder="Votre prénom *" aria-label="Votre prénom *">
        </div>        
      </div>
    
      <div class="flex flex-wrap -mx-3 my-8">
        <div class="w-full px-3 mb-6 md:mb-0">
          <input class="appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 leading-tight focus:outline-none focus:bg-gray-100" type="text" name="adresse" placeholder="Adresse" aria-label="Adresse">
        </div>       
      </div>

      <div class="flex flex-wrap -mx-3 my-8">
        <div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
          <input class="appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 leading-tight focus:outline-none focus:bg-gray-100" type="text" name="phone" placeholder="Téléphone *" aria-label="Téléphone *">
        </div>
        <div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
          <input class="appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 leading-tight focus:outline-none focus:bg-gray-100" type="email" name="email" placeholder="E-mail *" aria-label="E-mail *">
        </div>        
      </div>
      
      <div class="flex flex-wrap -mx-3 my-8">
        <div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
          <input class="appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 leading-tight focus:outline-none focus:bg-gray-100" type="text" name="zip" placeholder="Code Postal *" aria-label="Code Postal *">
        </div>
        <div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
          <input class="appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 leading-tight focus:outline-none focus:bg-gray-100" type="text" name="city" placeholder="Ville *" aria-label="ville *">
        </div>        
      </div>

    </div>
    <div class="w-full md:w-1/2 px-3">
      <div class="relative my-8">
        <select class="appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 leading-tight focus:outline-none focus:bg-gray-100" id="grid-category">
          <option name="id_order">Catégorie d'emballage*</option>
          <option value="Produits Dangereux">Produits Dangereux</option>
          <option value="Produits Biologiques">Produits Biologiques</option>
          <option value="Produits Thermosensibles">Produits Thermosensibles</option>
          <option value="Fragiles ou spécifiques">Fragiles ou spécifiques</option>
          <option value="Transplantation">Transplantation</option>
        </select>
        <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
          <svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/></svg>
        </div>
      </div>
      <div class="mt-8">
        <textarea rows="11" class="appearance-none bg-transparent border-b border-gray-300 w-full text-gray-700 mr-3 p-4 focus:bg-gray-100 leading-tight focus:outline-none" name="message" placeholder="{l s='How can we help?' d='Shop.Forms.Help'}"></textarea>
        {if isset($id_module)}
          <div class="form-group row">
            <div class="offset-md-3">
              {hook h='displayGDPRConsent' id_module=$id_module}
            </div>
          </div>
        {/if}      
      </div>
      <div class="flex flex-wrap">
        <div class="w-full">
          <div class="md:flex md:items-center mb-2">
            <label class="block text-gray-500 font-bold">
              <input class="mr-2 leading-tight" type="checkbox">
              <span class="font-poppins-l text-color-3 text-xs text-left">
                J’ai lu et j’accepte la politique de confidentialité et accepte d’être recontacté
              </span>
            </label>
          </div>
          <style>
            input[name=url] {
              display: none !important;
            }
          </style>
          <input type="text" name="url" value=""/>
          <input type="hidden" name="token" value="{$token}" />
          <input class="w-full block py-3 px-6 bg-primary text-center font-proximaNova-r text-white" type="submit" name="submitMessage" value="{l s='Send' d='Shop.Theme.Actions'}">
        </div>
      </div>
    </div>
  </div>
 
</form>

 

Edited by james369 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...