Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#277 2006-02-23 12:11:00
Re: Plug-in: zem_contact_reborn
I’ve not heard of a problem using “to_form” before. I’ve just tried it out on my /test/ site without a problem though I didn’t use a custom field in the “to_form”. Just looking at your code, I’m wondering if you’ve copy/pasted it across because, if you have, you are showing the custom field name as “email-adress”, which is incorrectly spelled. I wonder if that is what is wrong.
In the mean time I have managed to make the “button element” work, or at least it looks OK so far.
Last edited by thebombsite (2006-02-23 12:14:23)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#278 2006-02-23 15:49:39
Re: Plug-in: zem_contact_reborn
Stuart,
The spelling was a good catch, although not the issue.
I tried replacing the contents of the “to_form” with a simple email address and that worked fine,
so somehow the email address is not getting passed from the custom field in the article to the “to_form”?
If you or anyone else has experimented with this any help would be appreciated.
Thx,
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#279 2006-02-23 15:58:27
Re: Plug-in: zem_contact_reborn
Well as I don’t use custom fields you’re going to say “how has he got away with it for so long” aren’t you? I’m assuming that the custom field is attached to an article and maybe your “to_form” needs to be called inside the article’s form otherwise the custom field will be empty. /-S
I’m now going to put the lid back on my can and move slowly away from my PC whilst you aren’t looking. OK? ;)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#280 2006-02-23 16:33:26
Re: Plug-in: zem_contact_reborn
Stuart,
hello, stuart, where’d you go?
I thought that’s what the to_form=“whateverform” was supposed to work. If people are just populating the to_form contents with an email address, they might as well hard code it into the zem_contact_reborn tags itself in the to=“whatever@whatever.com” property?
I must be missing the usefulness of this otherwise. When Mary implemented it, it was my need for this kind of thing that instigated and I use it on another site (but with a hack of applied that checks for an email associated with that section’s author). I’d really like to make this work so that end-users can simply enter their email address, title the article and have a contact form for themselves. Otherwise I put the zem_contact_reborn tags into an article’s body and they have to look for the email address itself and change it. Not that hard, but still.
I wouldn’t know how else to call the custom_field into that part of the tag in the article form.
It can’t look like this:
<code>
<txp:zem_contact to_form=”<txp:article form=“to_form” />” />
</code>
So I’m stumped.
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#281 2006-02-23 16:41:39
Re: Plug-in: zem_contact_reborn
You’re either missing my point or my point has gone blunt. The custom field’s contents have to come from somewhere so where is that?
On the other hand this might be a possible cause??
Last edited by thebombsite (2006-02-23 17:15:06)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#282 2006-02-24 05:25:37
Re: Plug-in: zem_contact_reborn
Stuart,
Thanks for your help and thoughts. I contacted Mary, mother of… well that part of the plugin and she let me know that the to_form=”“ functionality hadn’t been intended that way, but that the following php would suffice.
I have this in my to_form:
<code><txp:php>echo $GLOBALS[‘thisarticle’][‘email-address’];</txp:php></code>
So that all my stuff looks like this now:
form = Contact
<code>
<h2><txp:title /></h2>
<txp:zem_contact to_form=“to_form” >
<txp:zem_contact_text label=“name” />
<txp:zem_contact_email /><br />
<txp:zem_contact_text label=“Phone” min=7 required=“no”/><br />
<txp:zem_contact_textarea label=“Message” /><br />
<txp:zem_contact_submit label=“send your message” />
</txp:zem_contact>
</code>
form=to_form
<code><txp:php>echo $GLOBALS[‘thisarticle’][‘email-address’];</txp:php></code>
Once again, this allows me to have a contact form as an article which can have an email address passed to it, which is a workaround for not having a dropdown list of possible mail_from sources.
The email address is passed from a custom field in the article named “email-address”
Hope that helps someone.
Last edited by ma_smith (2006-02-24 05:28:40)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#283 2006-03-03 22:18:01
Re: Plug-in: zem_contact_reborn
Hey everybody!
I just switched over to this version from one that I had hacked up about a year ago. I am trying to adjust the code to allow me multi word entries in a select list and I am realizing how rusty my php is (not that it was ever extraordinary) after not hacking on anything in a while.
As it is now I am having to use:
<code><txp:zem_contact_select list=I-Need-It-Now!,I-Need-It-Soon,No-Hurry label=“Please Select Your Timeline” /></code>
Which gets parsed but it is not to pretty. Any suggestions are most appreciated as usual :)
Hmmmmmmmmm looks like the forum is a little wonky after the upgrade.
TEST
Last edited by soulship (2006-03-03 22:38:10)
Offline
#284 2006-03-04 00:32:07
Re: Plug-in: zem_contact_reborn
I hacked file uploads and a some nice article-creation code onto this plugin for Medium NYC — it’s on the Submit Work page — and am curious if I should branch this out as a seperate plugin or roll the changes (it’s a fair #) back to the zem_contact maintainers.
It’s pretty neat since it effectively allows people to post articles & upload files (both files and images) to a TXP-site w/o registering an account (!). Of course there’s lots of options for the article’s section, category, status (I have submissions all set to pending so that a mod must authorize them)… would other people have interest in this?
Ed: textiled the links
Last edited by jamiew (2006-03-04 00:33:52)
Offline
#285 2006-03-04 01:39:14
Re: Plug-in: zem_contact_reborn
Jamie,
I’d personally submit it as a separate plugin.
I think zem_contact_reborn is already getting big. I’d be interested to see how other’s weigh in on that though? From the submit work page, it looks good :)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#286 2006-03-04 08:04:23
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: Plug-in: zem_contact_reborn
jamiew, as a seperate plugin would be wondeful as there are no other plugins like this.
Thanks, Lee
Offline
#287 2006-03-04 08:08:17
Re: Plug-in: zem_contact_reborn
i’ll clean up my code and put something up soon!
Offline
#288 2006-03-04 12:24:14
Re: Plug-in: zem_contact_reborn
Well this is why we now have an API. We can think of several reasons why a plug-in needs to use certain functions of the contact form but not actually be a contact form itself. So thinking about the security aspect, we figured it would be much better if people only had one plug-in which contained these contact functions so that efforts to maintain security would be directed at one plug-in. Any new functions which people wanted to code could just do the bit it is responsible for then “hook-in” to zem_contact_reborn’s API to use the “contact” functions it needed to complete it’s job.
It seemed logical at the time. ;)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline