Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1066 2011-09-11 08:22:02
Re: zem_contact_reborn 4.0.3.20
One = correct
Two = correct, but it is missing a submit button. I’ve modified the code I posted a few posts back.
But… do you want to send an article to the person who is volunteering (which what your form is set up to do now) or is this supposed to be a contact form where the volunteer enters some personal information, which is sent to you by email through this contact form? In the latter case, you have to remove all the “send_article” stuff, so it becomes a regular contact form.
Offline
#1067 2011-09-14 02:28:01
- Rimfya
- Member
- Registered: 2007-11-22
- Posts: 31
Re: zem_contact_reborn 4.0.3.20
Any chance of this plugin getting an update for HTML5?
Offline
#1068 2011-09-14 02:49:30
Re: zem_contact_reborn 4.0.3.20
Are there any plans in baking a contact form directly into core?
…. texted postive
Offline
#1069 2011-09-14 04:03:40
Re: zem_contact_reborn 4.0.3.20
Are there any plans in baking a contact form directly into core?
“But then there is the chance that it will be obsolete soon, and difficult to maintain.” ;-)
Offline
#1070 2011-09-14 04:10:29
Re: zem_contact_reborn 4.0.3.20
maruchan wrote:
bq. Are there any plans in baking a contact form directly into core?
“But then there is the chance that it will be obsolete soon, and difficult to maintain.” ;-)
Core is soon to be obsolete? news to me ;-)
…. texted postive
Offline
#1071 2011-09-14 15:45:54
Re: zem_contact_reborn 4.0.3.20
uhm, some funny behaviour of ZCR here: i need to use a select/dropdown of countries in a form, and when i use more than ~ 50 countries, i run into a 500 error … is my server’s php configuration to blame, or is there a limitation built into ZCR?
best, -f
Offline
#1072 2011-09-14 17:13:03
Re: zem_contact_reborn 4.0.3.20
Rimfya wrote:
Any chance of this plugin getting an update for HTML5?
Yes, new version approaching completion.
Offline
#1073 2011-09-14 17:13:56
Re: zem_contact_reborn 4.0.3.20
funtoosh wrote:
uhm, some funny behaviour of ZCR here: i need to use a select/dropdown of countries in a form, and when i use more than ~ 50 countries, i run into a 500 error … is my server’s php configuration to blame, or is there a limitation built into ZCR?
Look at the error logs of your webserver. They should provide you with a more detailed error message. Could be a memory limit that you’re hitting.
Offline
#1074 2011-09-14 23:57:12
Re: zem_contact_reborn 4.0.3.20
ruud wrote:
Rimfya wrote:
Any chance of this plugin getting an update for HTML5?
Yes, new version approaching completion.
WooHoo
Offline
#1075 2011-09-17 12:45:10
Re: zem_contact_reborn 4.0.3.20
Ruud, sounds like a good suggestion, thx.
(Probably not a good idea to use a full 235 countries pulldown anyway, usability-wise.)
Offline
#1076 2011-09-19 16:11:48
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: zem_contact_reborn 4.0.3.20
Hi,
First of all, many thanks for this wonderful plugin! I’ve been using it for years, and can’t imagine building a textpattern site without it.
I’m now working on a form with a number of checkboxes. In order to make it easier to sort the emails resulting from this form, I’m looking for a way to use the checkboxes as input for the subject line of the email: I’d like the boxes that are checked to be listed in the subject.
So for example, a form like this:
[x] blue
[ ] yellow
[x] red
would be sent with the subject blue red.
And as a further complication, I’m using custom fields to determine the labels for the checkboxes:
<txp:if_custom_field name="custom1"><txp:asy_wondertag><txp:zem_contact_checkbox label="<txp:custom_field name="custom1" />" required="0" /></txp:asy_wondertag><br /></txp:if_custom_field>
<txp:if_custom_field name="custom2"><txp:asy_wondertag><txp:zem_contact_checkbox label="<txp:custom_field name="custom2" />" required="0" /></txp:asy_wondertag><br /></txp:if_custom_field>
Any help would be much appreciated!
iris
Last edited by M_i (2011-09-19 16:30:05)
Offline
#1077 2011-09-19 17:20:51
Re: zem_contact_reborn 4.0.3.20
Iris, assuming you have a recent version of TXP installed (recommended for security reasons), you don’t need asy_wondertag. And because the custom names can vary, it’s easier to also specify the name for each field:
<txp:if_custom_field name="custom1">
<txp:zem_contact_checkbox name="custom1" label='<txp:custom_field name="custom1" />' required="0" /><br />
</txp:if_custom_field>
<txp:if_custom_field name="custom2">
<txp:zem_contact_checkbox name="custom2" label='<txp:custom_field name="custom2" />' required="0" /><br />
</txp:if_custom_field>
You can then use a subject_form (attribute in the zem_contact tag) containing:
<txp:php>
global $zem_contact_values, $zem_contact_labels;
# list of checkboxes that are checked. Starts out empty.
$checked = array();
# loop through first 9 custom fields by name.
for ($i=0; $i < 10; $i++)
{
# check if the checkbox for this custom field exists and if it was checked by the user.
if (isset($zem_contact_values['custom'.$i]) and $zem_contact_values['custom'.$i] == gTxt('yes'))
{
# if so, add the label of this checkbox to the list.
$checked[] = $zem_contact_labels['custom'.$i];
}
}
# check if the user checked 1 or more checkboxes.
if ($checked)
{
# if so, the subject is the list of labels for those checkboxes, separated by a space.
echo implode(' ', $checked);
}
else
{
# otherwise default to this subject.
echo 'default subject in case no checkbox was checked';
}
</txp:php>
Not tested, but should work with up to 9 custom fields ;)
Offline
#1078 2011-09-19 18:55:04
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: zem_contact_reborn 4.0.3.20
Hi ruud,
Thank you very much for your quick reply! It works like a charm! You are brilliant!
As for the asy_wondertag – I’m using 4.4.1 and I can’t get this to work without it. When I take the asy_wondertags out, the checkboxes still appear in the form, but they disappear from the email and the subject reverts to the default.
Thanks again,
iris
Offline
#1079 2011-09-19 19:22:46
Re: zem_contact_reborn 4.0.3.20
@M_i: Are you using single quotes on the tag attributes that contain tags, like in ruud’s example?
<txp:zem_contact_checkbox name="custom1" label='<txp:custom_field name="custom1" />' required="0" />
Offline
#1080 2011-09-19 19:29:58
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: zem_contact_reborn 4.0.3.20
johnstephens wrote:
@M_i: Are you using single quotes on the tag attributes that contain tags, like in ruud’s example?
Ah, you’re very right – that’s it! Old habits and all… thank you very much!
Offline