Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1501 2015-05-16 12:20:20

pierlu
Member
Registered: 2014-08-12
Posts: 153

Re: zem_contact_reborn 4.0.3.20

Salve con il plugin Zem contact ho fatto in modo che venisse un errore quandoi uno sbaglia a fare il form come si fa a stilizzare il msg?

Offline

#1502 2015-05-16 12:52:27

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

Would you mind asking the question in English as well, so most of us don’t have to use Google Translate in an attempt to understand the question?

Having said that: Styling is documented in the plugin help

Offline

#1503 2015-05-17 11:28:06

pierlu
Member
Registered: 2014-08-12
Posts: 153

Re: zem_contact_reborn 4.0.3.20

Zem contact with the plugin I made sure that was a mistake quandoi one mistake to make the form how to stylize the warning?

Offline

#1504 2015-05-18 06:41:28

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,389
Website GitHub Mastodon Twitter

Re: zem_contact_reborn 4.0.3.20

The errors appear in a ul with zemError class.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#1505 2015-05-18 08:19:47

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

Re: zem_contact_reborn 4.0.3.20

Are you using the plugin from here? If so, Stef is the coordinator of that version.

Offline

#1506 2015-05-19 08:31:27

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: zem_contact_reborn 4.0.3.20

uli wrote #290372:

You make the checkbox mandatory with required="1" and only those who ticked it will be able to submit the form: <txp:zem_contact_checkbox label="Legal stuff accepted" required="1" /> Is that what you wanted to know?

Now the checkbox is needed to be flagged before sending the message: OK.
Now I’ve need another step to complete my module. I can’t link my terms and conditions with HTML code without generating an error.

My code:

<txp:zem_contact_checkbox label="I've read the <a href="http://mysite.it/legal">Legal stuff< /a> and I've accepted it." required="1" />

Last edited by candyman (2015-05-19 08:33:03)

Offline

#1507 2015-05-19 08:42:27

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

candyman wrote #290899:

My code:

<txp:zem_contact_checkbox label="I've read the <a href="http://mysite.it/legal">Legal stuff< /a> and I've accepted it." required="1" />

Should be.

<txp:zem_contact_checkbox label="I've read the <a href=""http://mysite.it/legal"">Legal stuff< /a> and I've accepted it." required="1" />

If that doesn’t work, which error do you get?

Offline

#1508 2015-05-19 08:47:18

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: zem_contact_reborn 4.0.3.20

It doesn’t work.

Beside the checkbox I get this:

I’ve read the <a href=“http://mysite.it/legal”>Legal stuff< /a> and I’ve accepted it.

Offline

#1509 2015-05-19 09:01:30

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

Hmm… it probably escapes the label. Try this:

<txp:zem_contact_checkbox label="I've read the" required="1" /><a href="http://mysite.it/legal">Legal stuff</a> and I've accepted it.

Offline

#1510 2015-05-19 09:33:28

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: zem_contact_reborn 4.0.3.20

Perfect, it works! :D

Thanks!

Offline

#1511 2015-05-19 09:45:11

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: zem_contact_reborn 4.0.3.20

No, there’s still a problem.
I someone dosn’t check the checkbox the error message is this:

The required field “I’ve read the ” is empty (or similar). How can avoid this?

Last edited by candyman (2015-05-19 09:45:29)

Offline

#1512 2015-05-19 10:00:36

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

<txp:zem_contact_checkbox label="I've read the legal stuff and I've accepted it" required="1" />: <a href="http://mysite.it/legal">conditions</a>

Offline

#1513 2015-05-19 10:07:01

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: zem_contact_reborn 4.0.3.20

The problem is that I’ve three different pages that the user have to read: legal stuff, privacy and cookie policy (never mentioned before ‘cause I thought was not important). All with links to their own page.

With the last method is not possible :(

My actual code:

<txp:zem_contact_checkbox label="I've read the " required="1" /><a href="http://mysite.it/disclaimer">legal stuff</a>, la <a href="http://mysite.it/privacy">Privacy Policy</a> and the <a href="http://mysite.it/cookie">Cookie Policy</a> and I accept all their>terms and conditions.<br /><br />

Anyway, if is not possible, I’ll link only the Legal one. Thanks for your precious help!

Last edited by candyman (2015-05-19 10:19:05)

Offline

#1514 2015-05-19 10:28:37

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: zem_contact_reborn 4.0.3.20

Maybe try setting up the label text in a variable in advance:

<txp:variable name="link_text">I've read the <a href="http://mysite.it/disclaimer">legal stuff</a>, la <a href="http://mysite.it/privacy">Privacy Policy</a> and the <a href="http://mysite.it/cookie">Cookie Policy</a> and I accept all their>terms and conditions.</txp:variable>
<txp:zem_contact_checkbox label='<txp:variable name="link_text" />' required="1" />

Or wrap <txp:zem_contact_checkbox label="I've read the stuff" /> in <txp:rah_replace /> and get it to replace the string “stuff” with the link markup?

Offline

#1515 2015-05-19 10:34:03

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

That wouldn’t work for the error message. You could do this by modifying the plugin.

At the end of the zem_contact_checkbox function, change this line:

'<label for="'.$name.'" class="zemCheckbox '.$zemRequired.$isError.' '.$name.'">'.htmlspecialchars($label).'</label>';

Into:

'<label for="'.$name.'" class="zemCheckbox '.$zemRequired.$isError.' '.$name.'">'.$label.'</label>';

You do have to make sure that the label is valid HTML.

Offline

Board footer

Powered by FluxBB