Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#769 2010-05-05 08:19:53

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Re: zem_contact_reborn 4.0.3.20

crea-viv wrote:

hi there! i have used this plugin to create a contact form and filled the input fields with default=”“ with the label name. is there any chance this “ default=”“ “ – content disappears if the users clicks in the input field to fill it out?

In case you mean removing the contents of a field on click, check this out

Offline

#770 2010-05-05 08:29:21

crea-viv
Member
Registered: 2010-04-28
Posts: 14

Re: zem_contact_reborn 4.0.3.20

this is great – thank you @datorhaexa.
but the plugin doesn´t take the “value” and “class” tags…. :-(

is there any other solution for this?

Offline

#771 2010-05-05 08:48:03

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Re: zem_contact_reborn 4.0.3.20

crea-viv wrote:

this is great – thank you @datorhaexa.
but the plugin doesn´t take the “value” and “class” tags…. :-(
is there any other solution for this?

Have a look at your HTML first. You will notice that the default value is now given as the value for ähm.. “value”. It is true that the plugin does not let you define your own classes but it gives classes for your form elements, so that you can now pick that class and use it in the javascript I linked to by changing the hook/class it needs to remove the contents from your fields.

Offline

#772 2010-05-05 08:52:17

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: zem_contact_reborn 4.0.3.20

Hi crea-viv,

the default="default-text" attribute will become the value item but the class you cannot change. Either change the javascript datorhaexa linked to or try another javascript solution such as this labelify jquery plugin – look at the second section on that page for an example of how to use the label text as sample entry.


TXP Builders – finely-crafted code, design and txp

Offline

#773 2010-05-05 09:18:37

crea-viv
Member
Registered: 2010-04-28
Posts: 14

Re: zem_contact_reborn 4.0.3.20

ok, i left the class-tag out now and if i am understanding you right i have to change my “clear-default-text.js”-file.
there is online one line, where i can find the class which is given in the example:

if (theInput.type == ‘text’ && theInput.className.match(/\bcleardefault\b/)) { /* Add event handlers */ addEvent(theInput, ‘focus’, clearDefaultText, false); addEvent(theInput, ‘blur’, replaceDefaultText, false);

i replaced it with:

if (theInput.type == ‘text’ && theInput.className.match(/\binput.zemContactForm\b/)) { /* Add event handlers */ addEvent(theInput, ‘focus’, clearDefaultText, false); addEvent(theInput, ‘blur’, replaceDefaultText, false);

doesn´t work….. :-(

is this the right place?

Offline

#774 2010-05-05 14:10:05

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Re: zem_contact_reborn 4.0.3.20

Your script is checking if the fild is of type text and if it has a class name so and so. Your class is “zemContactForm” (for instance – I don’t know right now if it is, because I have no running ZCR install before me), so you replace the class name in the script with this.

Last edited by datorhaexa (2010-05-05 14:11:20)

Offline

#775 2010-05-05 14:34:03

crea-viv
Member
Registered: 2010-04-28
Posts: 14

Re: zem_contact_reborn 4.0.3.20

oh great, now it works for the input fields.
i didn´t have to use input.zemContactForm but “zemText” as the class.

but it doesn´t work for the textarea field.

any idea?

Last edited by crea-viv (2010-05-05 14:40:41)

Offline

#776 2010-05-05 15:05:47

crea-viv
Member
Registered: 2010-04-28
Posts: 14

Re: zem_contact_reborn 4.0.3.20

another topic for this plugin:

i am trying to have a “send article”-link in each article.
is there a chance to replace the text-link with an image?

i used this code to generate it:

<txp:zem_contact_send_article />

—> i don´t mean the submit button in the form.

Offline

#777 2010-05-28 11:35:09

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: zem_contact_reborn 4.0.3.20

hi there,
i have a question on using the (great!) user selectable recipient feature with ZCR: can i call my different recipients via individual URLs?

e.g.: http://example.com/contact?recipient=support

cheers,
-f

Offline

#778 2010-05-29 22:55:04

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

funtoosh, you can do that by replacing $zem_contact_form['Department'] in the example code with $_REQUEST['recipient'].

Offline

#779 2010-05-30 17:42:21

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: zem_contact_reborn 4.0.3.20

ruud, thanx for the reply, i’ll give that a try!

Offline

#780 2010-06-07 14:31:18

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: zem_contact_reborn 4.0.3.20

yep, works like a charm! this is like the best & simplest contact form tool ever!

now i only have to automatically generate the list of recipients from my entries, let’s see if that works …

best,
-f

Offline

Board footer

Powered by FluxBB