Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#157 2017-02-02 20:20:12

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Another feature request: make the appending of the URL fragment (the one that identifies & anchors to the contact form element: e.g. #zcr1234567abcdefg) to the action attribute optional, as it may affect the functionality of the redirect option.
How does the appending of the URL fragment to the action attribute affect the redirect functionality?
After submitting the form, when the destination URL also has the contact form rendered (for example, in a site-wide contact form present in the site footer), the user gets scrolled down to the form again, instead of being presented with whatever is in the redirect URL (usually, a “thank you” message and some call to actions).

I’d say that it might be safe to make them mutually exclusive: if the redirect option is used, it seems undesirable/unnecessary to have the URL fragment appended to the action attribute.

PS: should I re-post this feature request and the previous one as issues on the GH page for ZCR?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#158 2017-02-03 00:06:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Thanks for the feature requests, maniqui. Both worth considering I think.

Please if you would open issues for them in GitHub it’ll be easier for me to track (and not forget about them). Feel free to just reference these posts instead of writing it all out again in the Issue text. Thanks.


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

#159 2017-02-12 15:14:56

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Hi,

Iam not sure to understand. I using the actually textpattern-cms-version and this plugin zem_contact_reborn v4.5.0.0 and is activated.
I have installing zem_contact_lang-de too and is activated. But it seem that the zem_contact_lang-de don’t work.

How I can install the language German for output the error-info or output-message in german after send the contact-formular?

Offline

#160 2017-02-12 18:15:05

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

In the form tag you can include a thanks_form.

<txp:zem_contact to="x@y" … form="kontakt" thanks_form="kontakt-danke" copysender="1" />

Respect to the error message, it seems that the textpack doesn’t work correctly. If a required field is empty, so the error message is:

Required field, &#8220;<strong>{field}</strong>&#8221; is missing.

The German translation from line 199 in the textpack isn’t used:

zem_contact_field_missing => Erforderliche Eingabe im Feld &#8220;<strong>{field}</strong>&#8221; fehlt.

Offline

#161 2017-02-13 11:11:15

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

nl-nl.textpack added in github

kees

Offline

#162 2017-02-13 23:33:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

GugUser wrote #303991:

Respect to the error message, it seems that the textpack doesn’t work correctly.

It should. Pat64 raised this issue and I addressed it so error messages appear in the site language. In 4.6.2 it defaults of course to the admin-side language in use, but if your site content is in German, add lang="de-de" to your <txp:zem_contact> tag and the errors should come out in that language. And “de-de” can be injected programmatically via other tags if you run (for example) MLP or some other language capable plugin.

kees-b wrote #303995:

nl-nl.textpack added in github

Awesome, thanks. I’ll merge that in when I can.

Last edited by Bloke (2017-02-13 23:34:51)


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

#163 2017-02-14 00:51:05

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Bloke wrote #304011:

In 4.6.2 it defaults of course to the admin-side language in use, but if your site content is in German, add lang="de-de" to your <txp:zem_contact> tag and the errors should come out in that language. And “de-de” can be injected programmatically via other tags if you run (for example) MLP or some other language capable plugin.

In the case of the site I’m working, this is not so. The admin language is German and now I added the lang="de-de" attribute to the <txp:zem_contact /> tag, but the error messages still are in English. I tried the same with lang="fr-fr". It also doesn’t work.

Last edited by GugUser (2017-02-20 03:36:27)

Offline

#164 2017-02-16 17:09:26

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

GugUser wrote #304012:

In the case of the site I’m working, this is not so. The admin language is German an now I added the lang="de-de" attribute to the <txp:zem_contact /> tag, but the error messages still are in English. I tried the same with lang="fr-fr". It also doesn’t work.

On my site too, the error is still in english. I have lang="de-de" inside <txp:zem_contact /> tag.
Edit: you can testing it on www.artwesertor.de/kontakt

How I can make a “*” after a label-text, if this is required?

Last edited by lythande (2017-02-16 17:10:38)

Offline

#165 2017-02-16 22:23:42

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

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

lythande wrote #304058:

How I can make a “*” after a label-text, if this is required?

You could simply use CSS and a rule like this:

.zemRequired::after {
    content: " *";
    color: red;
    font-weight: bold;
}

In case you’d also want to cover browsers without CSS support or switched off you’d need some PHP in order to alter the HTML, e.g.

<txp:php>echo preg_replace('/CODE TO LOOK FOR/','REPLACEMENT CODE', parse('<txp:YOUR ZEM_CONTACT_TAG />'));</txp:php>

Leave the slashes around the search term, it won’t work otherwise. And make sure both your CODE TO LOOK FOR and your REPLACEMENT CODE do not contain single quotes.


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

Offline

#166 2017-02-17 10:14:14

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

Much thanks Uli!

In the old zem_contact_reborn-Plugin I have wrote follow code in the plugin:
Its one for the “*” and for blind People with speakprograms (handling better with aria-extensions).

function zem_contact_text($atts)
{...
        $zemRequired = $required ? 'zemRequired' : '';
        $zemRequiredstar = $required ? '<span class="unsichtbar"> (Pflichteingabe)</span>' : ''; #neu 14.07.15 
        $zemRequiredaria = $required ? 'aria-required="true" aria-invalid="true"' : ''; #neu 26.10.09

        return '<label for="'.$name.'" class="zemText '.$zemRequired.$isError.' '.$name.'">'.htmlspecialchars($label).''.$zemRequiredstar.$isError.'</label>'.$break.  #neu 26.10.09 (Reqiredstar eingefuegt) 
		'<input type="text" id="'.$name.'" class="zemText '.$zemRequired.$isError.'" name="'.$name.'" value="'.htmlspecialchars($value).'"'.$size.$maxlength.' '.$zemRequiredaria.' />'; #neu 26.10.09 Requiredaria eingefügt
}
function zem_contact_textarea($atts)
{... 
        $zemRequired = $required ? 'zemRequired' : '';
        $zemRequiredstar = '<span class="unsichtbar"> (Pflichteingabe)</span>' : ''; #neu 14.07.15
        $zemRequiredaria = $required ? 'aria-required="true" aria-invalid="true"' : ''; #neu 26.10.09

	return '<label for="'.$name.'" class="zemTextarea '.$zemRequired.$isError.' '.$name.'">'.htmlspecialchars($label).''.$zemRequiredstar.$isError.'</label>'.$break. #neu 26.10.09 (Reqiredstar eingefuegt) 
		'<textarea id="'.$name.'" class="zemTextarea '.$zemRequired.$isError.'" name="'.$name.'" cols="'.$cols.'" rows="'.$rows.'" '.$zemRequiredaria.' >'.htmlspecialchars($value).'</textarea>'; #neu 26.10.09 Requiredaria eingefügt
}
function zem_contact_checkbox($atts)
{...
        $zemRequired = $required ? 'zemRequired' : '';
        $zemRequiredstar = $required ? '<span class="unsichtbar"> (Pflichteingabe)</span>' : ''; #neu 14.07.15
        $zemRequiredaria = $required ? 'aria-required="true" aria-invalid="true"' : ''; #neu 26.10.09

	return '<input type="checkbox" id="'.$name.'" class="zemCheckbox '.$zemRequired.$isError.'" name="'.$name.'"'.
        ($value ? ' checked="checked"' : '').' '.$zemRequiredaria.' />'.$break. #neu 26.10.09 Requiredaria eingefügt
        '<label for="'.$name.'" class="zemCheckbox '.$zemRequired.$isError.' '.$name.'">'.htmlspecialchars($label).''.$zemRequiredstar.$isError.'</label>'; #neu 26.10.09 Requiredstar eingefügt
}

Its similar code work for the new zem_contact_reborn too?

Last edited by lythande (2017-02-17 10:20:43)

Offline

#167 2017-02-17 10:55:59

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

lythande wrote #304084:

In the old zem_contact_reborn-Plugin I have wrote follow code in the plugin:
Its one for the “*” and for blind People with speakprograms (handling better with aria-extensions).

Good work, thanks. The aria-required should probably be in the plugin as standard. Not sure how to handle the asterisk thing. I’ll think about it.


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

#168 2017-02-17 13:29:25

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: zem_contact_reborn v4.5.0.0: contact mail form processing

An idea, maybe another people wish using another sign as a “*”:
Could be here it as a required-sign="(insert here the sign e.g. a *)" in the plugin?
If nothings setting, but required="1", then no required-sign is shown.

Offline

Board footer

Powered by FluxBB