Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1321 2013-06-22 13:51:00

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: zem_contact_reborn 4.0.3.20

Hi Guys, I made some more edits to zem_contact_reborn, it includes modernizr and jquery fallback if the html5 type isn’t supported natively by the browser, thought it might come in useful for any html5 nuts like me ;)

I had to write an article with instructions as you need the Jquery and Modernizr library, plus a new tag to output the js needed, full article with instructions and download at http://www.proximowebdesign.ie/blog/textpattern-html5-web-form-with-modernizr-fallback

This used the latest copy of zem_contact v.20, however be aware if you install my plugin it installs over your existing, so trial on a test server first perhaps:

http://www.proximowebdesign.ie/blog/textpattern-html5-web-form-with-modernizr-fallback

I hope it helps someone, all validated via w3c (such as their html5 spec is ;) )

You can see how the form outputs on my own web design cork enquiry page feel free to click into things and see on different browsers, safari does a lovely native ‘date’ display and chrome does a fab job with the html5 stuff too.. shockingly IE10 supports native ‘range’ input where Firefox 21 does not which was a shocker!


…………………
I <3 txp
…………………

Offline

#1322 2013-06-24 11:44:34

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: zem_contact_reborn 4.0.3.20

Thank you very much, Hilary, will come in handy!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#1323 2013-06-24 11:55:34

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: zem_contact_reborn 4.0.3.20

You’re welcome Uli :)

It’s awful to have to fall back with all this js added hated that, but then it is compatible back to ie7 so has to be done.. would be awesome if all the browsers would recognise html5 it’s got so many shiny new things!!


…………………
I <3 txp
…………………

Offline

#1324 2013-08-14 16:32:38

gilibaus
Member
From: Italy
Registered: 2013-08-14
Posts: 92
Website

Re: zem_contact_reborn 4.0.3.20

Hi,
the plugin is working fine but I am having some troubles styling it. I only need to enlarge labels and fields. The page to view it is http://mindfulness.altervista.org/index.php?s=contatti.

Do I have to add the styles myself to the main CSS?
The label tag has a class=“zemText zemRequired Nome”, so it’s actually 3 styles in a row: can I leave zemText only and style it in the CSS?

Thanks for your help.

Offline

#1325 2013-08-14 16:46:41

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: zem_contact_reborn 4.0.3.20

Unfortunately, the names of the classes are all fixed within the plugin.

I’m in the process of modifying the plugin so that I can feed in class names as attributes. I did it once before but when I moved hosting providers didn’t bring the changes across and lost them all!

Offline

#1326 2013-08-14 17:03:13

etc
Developer
Registered: 2010-11-11
Posts: 5,680
Website GitHub

Re: zem_contact_reborn 4.0.3.20

gilibaus wrote:

can I leave zemText only and style it in the CSS?

Sure you can apply CSS to zemText class only, though it could be overwritten by the others. Just try.

aslsw66 wrote:

Unfortunately, the names of the classes are all fixed within the plugin.

Did I mention that etc_query can alter any attribute of any tag?

Last edited by etc (2013-08-14 20:47:24)

Offline

#1327 2013-08-14 20:56:32

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: zem_contact_reborn 4.0.3.20

Did I mention that etc_query is so powerful that it can do everything except teach me how to use it?!

Yes, it’s a good reminder that I need to expand my skills some more.

Offline

#1328 2013-08-15 12:01:19

michaelb
Member
From: London, UK
Registered: 2008-04-02
Posts: 21

Re: zem_contact_reborn 4.0.3.20

Hi there.

Does anyone have a link to a zem_contact_lang in Russian I could use?

Also, is there one in Portuguese that anyone would share?

Offline

#1329 2013-09-13 16:00:44

zainul.dss
New Member
Registered: 2013-03-18
Posts: 9

Re: zem_contact_reborn 4.0.3.20

hi All,

I have integrated the contact form and its working well.I have also redirect this to thanks page but when it came to thanks page some chunks characters added with thanks url like abcs.com/thanks#zcrd9c46fba5898fa2fdeb5fcf67bb67ebd.
So how we remove the last chunk chars after thanks.

regards
Zain

Offline

#1330 2013-09-13 17:03:21

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

@zainul.dss: you can try editing the code and change this line

$uri = hu.ltrim($redirect,'/');

into

$uri = hu.preg_replace('/#.*/', '', rtrim(ltrim($redirect,'/'));

If that doesn’t work, you can’t change it.

Offline

#1331 2013-09-13 19:51:11

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

Re: zem_contact_reborn 4.0.3.20

You may also use the jQuery.form plugin.

Offline

#1332 2013-10-02 17:47:32

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: zem_contact_reborn 4.0.3.20

Hi Ruud,

A year ago, you helped me solve insertion of database fields from a zem_contact form. Everything has been fine, but now the insertion into the database fails it seems.

The server has PHP 5.3 and I am running this on Textpattern 4.4.1.

Here’s the code that I have been using:

<?php
global $zem_contact_values, $zem_contact_error;
if( !empty( $_POST['zem_contact_submit'] ))
{
$formTitle = doSlash(trim(ps('title')));
$formFirstName = doSlash(trim(ps('first_name')));
$formLastName = doSlash(trim(ps('last_name')));
$formEmail = doSlash(trim(ps('email')));
$formMobile = doSlash(trim(ps('mobile')));
$formSecret = doSlash($zem_contact_values['voucher_code']);
  if(!empty($formFirstName) and !empty($formEmail))
  {
    $result = safe_insert('voucher_codes', "timestamp=NOW(), title='$formTitle', first_name='$formFirstName', last_name='$formLastName', email='$formEmail', mobile='$formMobile', voucher_code='$formSecret'");
	if (!$result) $zem_contact_error[] = "Eror processing your request. Please try again.";
  }
}
?>

I assume it’s something to do with the database, but I have no clue. Can you help please?

{Edited to make the final sentence visible . – Uli}

Last edited by uli (2013-10-02 18:30:34)

Offline

#1333 2013-10-04 20:22:13

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

Add this below the second if:

echo mysql_errno() . ": " . mysql_error() . "\n";

That should hopefully dump an error message on your screen when submitting the form.

Offline

#1334 2013-10-08 20:43:38

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Re: zem_contact_reborn 4.0.3.20

Been using the fantastic zem_contact_reborn plugin for various needs, and it always got me through. However, I have a really special situation that I would love to be able to solve with ZCR, even if it means I need to hack the core.

So, I have a form that users fill out, no biggie. However, I have a checkbox that if checked, the form should send the email to a specific recipient (a special email address).

So I basically need to send three emails:

  1. One for the person that submitted the form
  2. One to the original recipient of the form
  3. One to a specific email address, only if a checkbox has been checked

I would really appreciate any help on this matter, whatsoever.

Cheers!

Offline

#1335 2013-10-09 16:29:54

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

Dragan, you can do that with a to_form attribute:

<txp:zem_contact to_form="my_zem_contact_to_form">
...
</zem_contact>

Where the “my_zem_contact_to_form” form contains something like:

<txp:php>
  global $zem_contact_form;
  $to = 'original@recipient.org';
  if ($zem_contact_form['label of the checkbox'] == "Yes"]
  {
    $to .= ',checked@recipient.org'
  }
  echo $to;
</txp:php>

However, this sends the emails #2 and #3 as a single email with 2 recipients. If you really want a separate #3 email so #2 doesn’t see #3 gets the email as well, then it can only be done by editing the plugin code.

Offline

Board footer

Powered by FluxBB