Search…

X3 Photo Gallery Support Forums

Search…
 
LeiRuM
Experienced
Topic Author
Posts: 31
Joined: 18 Jan 2009, 11:15

Contactform

20 Oct 2017, 20:50

How can I modify the contact form as in this web ??? http://larryanda.com.au/contact/

When I modify my form it stops sending emails
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14002
Joined: 30 Sep 2006, 03:37

Re: Contactform

20 Oct 2017, 22:49

I tested the form from here, and it seems to work fine. How are you diagnosing it as not sending?
Image
 
LeiRuM
Experienced
Topic Author
Posts: 31
Joined: 18 Jan 2009, 11:15

Re: Contactform

22 Oct 2017, 07:31

That's a sample page.
My page is http://www.Perspectivestudio.es/contact
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14002
Joined: 30 Sep 2006, 03:37

Re: Contactform

22 Oct 2017, 07:58

I can say the following for sure: You are using a custom TABLE html in your form, and although there is nothing wrong with that, your HTML is not 100% correct/valid. You have some missing opening or closing html tags, and therefore the form elements are getting wrapped OUTSIDE the <form> tag. Missing/incorrect tags are usually "forgiven" by the browser, because it will try to "guess" where to close your tags. However, that could mean it will wrap the form prematurely also.
Image

I can only say exactly where you have a missing or incorrect html tag(s) if you provide me login to your panel, or if you paste all your html here.

On a side-note, you would be better off using responsive columns html instead of a table, but that is another topic.
 
LeiRuM
Experienced
Topic Author
Posts: 31
Joined: 18 Jan 2009, 11:15

Re: Contactform

22 Oct 2017, 13:17

Code
<style type="text/css">
    table {
       border:0px solid black;
       border-collapse:separate; 
       border-spacing:20px;
       } 
    th, td {
       border:0px solid black;
       } 
</style>
<form data-abide class=contactform>
<center>
<table> 
<tbody> 
<tr> 
<td><div><input required type=text name="Nombre" placeholder="Nombre"></div>
</td> 
          <td><div><input required type="email" name="Email" placeholder="Email"></div>
</td> 
</tr> 
<tr> 
<td><div><input required type=text name="Telefono" placeholder="Telefono"></div>
</td> 
<td><div><input required type="text" name="Instagram" placeholder="Instagram"></div>
</td>
</tr> 
<tr> 
<td><div><input required type=text name="Fecha del Evento" placeholder="Fecha del Evento"></div>
</td> 
<td><div><input required type="text" name="Provincia/Ciudad" placeholder="Provincia/Ciudad"></div>
</td>
</tr> 
        <tr> 
<td colspan="2"><div><textarea required rows=6 name="message" placeholder="Cuéntanos algúnos detalles más acerca de tu boda, como te la imaginas, donde realizaras los preparativos, la ceremonia, el banquete..."></textarea>
  </div>
</td> 
</tr> 
        <tr> 
<td colspan="2"> <button type=submit>Send</button>
</td>
</tr>
</tbody> 
</table>
</center>
</form>

 
User avatar
mjau-mjau
X3 Wizard
Posts: 14002
Joined: 30 Sep 2006, 03:37

Re: Contactform

23 Oct 2017, 02:07

When I paste that code in a test page here, the result is different from your website:
Image
As you can see, all the form elements (inside the table rows) get correctly wrapped INSIDE the <form> tag. There is something different in the code you have added and saved in your website, and I need to see it. There must be an orphan html tag somewhere, which is corrupting the html.
 
LeiRuM
Experienced
Topic Author
Posts: 31
Joined: 18 Jan 2009, 11:15

Re: Contactform

23 Oct 2017, 09:29

data sent!!

Thanks!!!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14002
Joined: 30 Sep 2006, 03:37

Re: Contactform

23 Oct 2017, 10:16

Fixed!


It was not your fault, but it failed because your email input had name="Email" instead of name="email". The email field is a bit special, because it is used by X3 to validate sender of the form. I changed it from:
Code
<input required type="email" name="Email" placeholder="Email">
To:
Code
<input required type="email" name="email" placeholder="Email">
In next release X3.24.0, you can use either name="email" or name="Email", or omit the email altogether (if you don't need the users email for any reason).
 
LeiRuM
Experienced
Topic Author
Posts: 31
Joined: 18 Jan 2009, 11:15

Re: Contactform

23 Oct 2017, 12:14

Wow a simple capital letter !!! Thanks for your help Karl !!!!!