Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2016-02-20 07:33:30

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,535
GitHub Twitter

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

@Stef:

I want to translate the error message and the zem_contact_field_missing text into 3 languages depending of my contact pages.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#26 2016-03-14 10:53:32

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 783
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Trying to implement the new version of zem_contact on misterdutch.nl/new (uc) … it’s at the bottom near the telephone number: “… of wilt u door Mister Dutch gebeld worden?”.

It’s a collaboration with the Foundation 5.x reveal plugin …

In article a form <txp:output_form form="zem_contact_reveal" />:

<a href="#" data-reveal-id="myModal">of wilt u door Mister Dutch gebeld worden?</a>
<div id="myModal" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h2 id="modalTitle">Ja, ik wil graag door Mister Dutch gebeld worden ...</h2>
<p>Vul onderstaand formulier in en u wordt zo snel mogelijk - als het kan nog dezelfde dag - teruggebeld.</p> 
<p>En als u wilt, kunt u ons dan meedelen waarvoor u gebeld wilt worden? In welke gemeente werkt of woont u? Een e-mailadres is ook handig. Voor als we u telefonisch niet kunnen bereiken. Maar u kunt ook gewoon alleen uw naam en telefoonnummer doorgeven.</p>
<p><txp:zem_contact to="redfoxwebdesign@gmail.com,nettyvanderveen@misterdutch.nl" form="zem_contact_reborn" label="" copysender="1" thanks="Het bericht is verstuurd. Dank u." show_error="0" /></p>
<a class="close-reveal-modal" aria-label="Close">&#215;</a>
</div>

Form ‘zem_contact_reborn”:

<!-- form with p's to style background images > http://codepen.io/rexkirby/pen/Fdnlz -->
<fieldset>
<!--<legend>Formulier</legend>-->
<p class="text"><txp:zem_contact_text label="Wat is uw voor- en achternaam?" required="1" /></p>
<p class="text"><txp:zem_contact_text label="Wat is uw telefoonnummer?" required="1" /></p>
<!-- <p class="email"><txp:zem_contact_email label="Wat is uw e-mailadres?" placeholder="" required="0" /></p>
<p class="text"><txp:zem_contact_text label="In welke gemeente woont u?" required="0" /></p>
<p class="text"><txp:zem_contact_text label="Voor welk bedrijf werkt u?" required="0" /></p> -->
<p class="textarea"><txp:zem_contact_textarea label="Eventuele mededelingen ..." cols="" rows="" required="0" placeholder="" /></p>
<p class="submit"><txp:zem_contact_submit label="">Verzenden</txp:zem_contact_submit></p>
</fieldset>

The modal pops up. You can edit the inputs. But after clicking ‘Verzenden’ the modal is gone. No confirmation; no mail has been send. The funny thing is it’s all working with zem_contact_reborn version 4.3 … any clues?

Last edited by RedFox (2016-03-14 15:58:50)

Offline

#27 2016-03-24 11:45:35

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,494
Website GitHub Twitter

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Hi

I installed the plugin and the newone is awsome. especially the ability to add class.

But one thing is missing for foundation adding the word “required” into the input field, for foundation to use his javascript validation the input text should look like this:

<input name="jjhjh" class="hkjhkj" required />

If you can add that to your feature list.

Cheers.

Offline

#28 2016-03-24 11:56:42

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,555
Website GitHub Mastodon

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Dragondz wrote #298410:

But one thing is missing for foundation adding the word “required” into the input field …

Support for making a field required is already built-in, see here for an example (in the attributes)

Offline

#29 2016-03-24 12:25:23

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,494
Website GitHub Twitter

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Hi phil

I think you havent understood my require: foundation need the word “required” into the input field like i showed above to make the validation mechanism to work (see this link http://foundation.zurb.com/sites/docs/abide.html )

Cheers

Offline

#30 2016-03-24 12:31:33

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,797
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

That is exactly what Phil is saying: you can add the tribute if you need it – or rather, it is added by default and you can tell a field not to be required by adding required="0" in your TXP form.

<txp:zem_contact_text break="" label="URL" placeholder="Your website" required="0" />

Where is that emoji for a solar powered submarine when you need it ?

Offline

#31 2016-03-24 12:37:30

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,555
Website GitHub Mastodon

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Er, you need required instead of required="required", is that what you mean?

If so, that is really a problem with Foundation’s code not our implementation, since both formats are perfectly valid.

Offline

#32 2016-03-24 14:33:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,858
Website GitHub

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Dragondz wrote #298410:

adding the word “required” into the input field

If you’re using beta.2 then this is taken care of. Boolean attributes are rendered without any values after them. So if you set required="1" in any ZCR tag, it will come out as required. If it doesn’t, let me know the tag you use that fails and I’ll look into it.

(btw, look at page source, NOT browser inspector: the inspector seems to always display boolean attributes with empty values after them, e.g. required="". But the source code shows it correctly, as the plugin outputs).


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#33 2016-03-27 07:16:01

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,494
Website GitHub Twitter

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Hi

Thanks for answers.

Yes i am using the latest beta 2 version found on github.

PS: SORRY MY BAD, I upadated the design of the website to a new responsive one, but i forgot to change the admin pref “Doctype” From XHTML to HTML5!

It works now like expected!

Offline

#34 2016-03-27 07:34:15

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,797
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

That code works for me. Note that the required attribute on the form element won’t do nothing (1st line in your code snippet).

Is your site set to use html5 – aka <!DOCTYPE html> (Preferences > Publish sub panel)? I think it is mentioned in the plugin help file that that attribute will only work when the site is set to use HTML5 (as it is invalid otherwise).


Where is that emoji for a solar powered submarine when you need it ?

Offline

#35 2016-04-06 21:42:25

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

It’s been a while since I used ZCR on a new site and so I have a question about this lovely new capable version 4.5.0.0. With my host, the 4.3 versions didn’t ever work, even with the SMTP envelope sender address TXP preference correctly set up with valid email address. Textpattern itself (txplib_misc) does, password sending and so on but not ZCR. I had to hack the plugin and include a PEARMAIL script to make the ZCR forms work.

Will this new 4.5.0.0 work with just the SMTP envelope sender address preference in the same way that txplib_misc does? If not, is it possible to align it so that it does. It’s become a pressing issue for me because the PEARMAIL script doesn’t work with PHP 5.6 and it would be great to be able to dispense with it and to rely on ZCR to do the business.

Offline

#36 2016-04-08 20:58:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,858
Website GitHub

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

joebaich wrote #298535:

Will this new 4.5.0.0 work with just the SMTP envelope sender address preference in the same way that txplib_misc does?

Yes, it does something very similar to the way core does it by reading the value of smtp_from and using it, if set. So hopefully this version will work for you. Please try it and let me know either way. If it doesn’t work, I’ll help you figure out how to set it up so it does, and fix the plugin to allow you to set headers the same as core so messages get through.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB