Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#973 2011-03-10 03:45:01

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: zem_contact_reborn 4.0.3.20

aslsw66 wrote:

You should be able to do this using @mem_form@ to post HTML form contents to a custom table in the textpattern database.

Also, don’t forget mem_simple_form. mem_form provided the api for the form fields, but it doesn’t know what to do with the input by itself. mem_simple_form can be used in conjunction with mem_form to direct the input into your database.

Offline

#974 2011-03-22 15:33:45

skrishi
Member
From: russia federation
Registered: 2011-02-25
Posts: 52
Website

Re: zem_contact_reborn 4.0.3.20

I have an error occurs. I’ll try to describe it …

if I’m doing here is so, then everything is fine sends:
Pay your attention to the field: zem_contact_email

<div id="form_contact">
<txp:zem_contact_serverinfo name="REMOTE_ADDR" label="IP number" />
<div id="contact_email_name"></div>
<div id="contact_email"><txp:zem_contact_email break=":<br>" /></div>
<div id="contact_email_name">Ваше сообщение:</div>
<div id="contact_body"><txp:zem_contact_textarea label="" break="" /></div>
<div id="contact_submit"><txp:zem_contact_submit label="Отправить" /></div></div>

Но если сделать вот так, что смоей точки зрения более правильно для дизайна:

<div id="form_contact">
<txp:zem_contact_serverinfo name="REMOTE_ADDR" label="IP number" />
<div id="contact_email_name">Вашь E-mail:</div>
<div id="contact_email"><txp:zem_contact_email label="" break="" /></div>
<div id="contact_email_name">Ваше сообщение:</div>
<div id="contact_body"><txp:zem_contact_textarea label="" break="" /></div>
<div id="contact_submit"><txp:zem_contact_submit label="Отправить" /></div></div>

The plugin returns an error and replaces the email address on what is written in the message body:

Last edited by ruud (2011-03-22 18:01:23)

Offline

#975 2011-03-22 18:06:22

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

Lera, that’s caused by setting label="" on multiple ZRC tags while at the same time not setting the name attribute for these tags, so either use a non-empty label or explicitly specify a the name attribute for each of the tags.

Offline

#976 2011-03-22 19:52:41

skrishi
Member
From: russia federation
Registered: 2011-02-25
Posts: 52
Website

Re: zem_contact_reborn 4.0.3.20

ruud wrote:

Lera, that’s caused by setting label="" on multiple ZRC tags while at the same time not setting the name attribute for these tags, so either use a non-empty label or explicitly specify a the name attribute for each of the tags.

Yes, I have already adapted to this, but … Thanks.
I thought that you need to report it, maybe you’ll want it fixed. In some cases, this situation may not be very comfortable.

There is another question. For example, the user knows how to send mail. Can somehow make this field hidden and substitute back an email user?

Offline

#977 2011-03-22 21:08:40

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

I don’t understand the question.

Offline

#978 2011-03-22 21:43:49

skrishi
Member
From: russia federation
Registered: 2011-02-25
Posts: 52
Website

Re: zem_contact_reborn 4.0.3.20

ruud wrote:

I don’t understand the question.

Oh, sorry for my english.
I begin to curse the days misspent in school.

The situation is as follows:
I use a plugin ign_password_protect.
I have a secure page with <txp:zem_contact />.
System, for example, knows RealName user.
I think she needs to know and email.
I want to on this page did not have an email address field, but the address was in my letter.

something like this:

<form method="post" action="/index.php?s=contact#zcr44043a89ee3708e2e64974d25a67f7c2">
<input type="hidden" name="zem_contact_nonce" value="48abacd85f570adf4595268833b36a04" />
<input type="hidden" name="zem_contact_form_id" value="44043a89ee3708e2e64974d25a67f7c2" />

<input type="hidden" name="Email" value="user@ mail.ru" />

<textarea id="invalid" class="zemTextarea zemRequired" name="invalid" cols="58" rows="8"></textarea>
<input type="submit" class="zemSubmit" name="zem_contact_submit" value="Отправить" />
</form>

Offline

#979 2011-03-22 22:17:40

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

If I understand correctly, you have a ZCR form behind password protection, so the person using the form has to log in first and therefore you know who that person is and what his/her email address is. Assuming you have a tag to print the email address on the website called <txp:abc_logged_in_email /> (perhaps fictional, but not hard to write, I assume), you could do this:

<txp:zem_contact_email default='<txp:abc_logged_in_email />' />

That would show an email field with pre-filled email address of the user that’s logged in. You could of course hide that field entirely by applying an appropriate CSS rule.

Offline

#980 2011-03-22 22:25:55

skrishi
Member
From: russia federation
Registered: 2011-02-25
Posts: 52
Website

Re: zem_contact_reborn 4.0.3.20

ruud wrote:

If I understand correctly, you have a ZCR form behind password protection, so the person using the form has to log in first and therefore you know who that person is and what his/her email address is. Assuming you have a tag to print the email address on the website called <txp:abc_logged_in_email /> (perhaps fictional, but not hard to write, I assume), you could do this:
<txp:zem_contact_email default=’<txp:abc_logged_in_email />’ />
That would show an email field with pre-filled email address of the user that’s logged in. You could of course hide that field entirely by applying an appropriate CSS rule.

Thanks, I’ll try to do it.

Offline

#981 2011-03-23 00:50:16

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

Re: zem_contact_reborn 4.0.3.20

I have done something similar. Although I’m using ign_password_protect to provide site login functionality, I also use mem_self_register to provide additional access to user information – ign_password_protect and mem_self_register work well together.

Here is what I have in my ZCR form:

<txp:zem_contact to_form="contact_to_form" from='<txp:mem_profile var="email" />' subject='Message from <txp:mem_profile var="RealName" />

What this does is send an email with the from field being whatever is in the logged-in user’s profile. Of course, it loses something if there is no email address for that user.

Offline

#982 2011-03-23 01:24:21

skrishi
Member
From: russia federation
Registered: 2011-02-25
Posts: 52
Website

Re: zem_contact_reborn 4.0.3.20

aslsw66 wrote:

I have done something similar. Although I’m using ign_password_protect to provide site login functionality, I also use mem_self_register to provide additional access to user information – ign_password_protect and mem_self_register work well together.
Here is what I have in my ZCR form:
<txp:zem_contact to_form="contact_to_form" from='<txp:mem_profile var="email" />' subject='Message from <txp:mem_profile var="RealName" />
What this does is send an email with the from field being whatever is in the logged-in user’s profile. Of course, it loses something if there is no email address for that user.

Thanks, I’ll try that too.

Offline

#983 2011-04-06 23:33:25

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: zem_contact_reborn 4.0.3.20

I use the following to build a select menu with predefined options:

<txp:zem_contact_select list="Please select…,Item 1, Item 2, Item 3" selected="Please select…" label="Enqiring about…" required="0" />

That works as expected, but I’m wondering, whether there is a way to append the selected item to the email’s subject line, so it would read “Website enquiry – Item 2”. At the moment I get the default subject line as defined in the attribute <txp:zem_contact subject="Website Enquiry" (etc.)>

Last edited by masa (2011-04-06 23:34:56)

Offline

#984 2011-04-07 00:08:36

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

Re: zem_contact_reborn 4.0.3.20

I think you’ll find there is an attribute called subject_form which will allow you to create a customised subject line for the email. The help documentation even includes an example of a subject line derived from a select menu.

I’m just about to start experimenting with this myself…

Offline

Board footer

Powered by FluxBB