Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#31 2004-07-22 16:00:48
- msteinruck
- Member
- Registered: 2004-07-14
- Posts: 44
Re: dca_mailto_form (simple email form)
Ahhh, I hadn’t seen that before. Do you know if it’s possible to drop this into a TXP page template and still have it work so I can maintain the search function on every page of the site?
Thanks for the tip.
Offline
Re: dca_mailto_form (simple email form)
Well, I’ve never tried to do it that way, but the script itself can be called as many times as you need it, so I don’t see why not. Just put the form you create wherever you need it.
Last edited by Damelon (2004-07-22 16:14:26)
Offline
#33 2004-07-22 18:06:13
- msteinruck
- Member
- Registered: 2004-07-14
- Posts: 44
Re: dca_mailto_form (simple email form)
I’m not sure if I’m reading the description in the Readme file of @recipients correctly, but I think I might be. In that case, this isn’t quite what I need it to do or I just don’t know enough about programming to make it work.
Here’s what I really need it to do. If someone comes onto the site and decides they want to email Customer Service, then they would click on a dropdown menu, select Customer Service and their message would be sent to that email address. If they wanted to email the Sales office, then they would click the drop down menu and … You get the picture.
Am I reading this wrong, or will this script not really do that?
I listed the URL to the previous script that I was trying to make work, but even when not incorporating it into TXP, I couldn’t make my php includes work to pull in certain template elements. Then I got to thinking about how I would lose functionality of the search if I didn’t include it into TXP, so that’s why I thought I’d ask.
Offline
Re: dca_mailto_form (simple email form)
Well, I’m not going to mock it up tonight, but I believe it will. I think it’s the %recipient_alias field part that allows for it.
Offline
#35 2004-07-22 18:24:20
- msteinruck
- Member
- Registered: 2004-07-14
- Posts: 44
Re: dca_mailto_form (simple email form)
Okay, well I’ll give it a shot with my limited knowledge of this stuff. If you end up mocking it up at any point and achieving the effect I’m talking about, would you mind posting it here? I could really use help with this solution.
Thanks a lot Damelon!
Offline
Re: dca_mailto_form (simple email form)
Recipient_alias and a bit of javascript to check what option is selected in the dropdown box should do it.
Refresh Dallas and other Refreshing Cities.
Offline
Re: dca_mailto_form (simple email form)
Okay, I think I’ve mostly got this figured out and posted what I think here :
http://textdrive.com/forum/viewtopic.php?pid=6948#6948
I haven’t had time to test it, and I probably won’t for at least a few days, if ever. Maybe it will give you a push in the right direction.
Offline
Re: dca_mailto_form (simple email form)
It doesnt want to send to Hotmail? I have a Hotmail address that I put in the tag and received nothing… I replaced it with a POP3 and it worked fine????
whaaaa???
Offline
Re: dca_mailto_form (simple email form)
Will send everywhere except Hotmail? How bizzarre is that?
Offline
Re: dca_mailto_form (simple email form)
I find it unlikely that the script is to blame.
Offline
Re: dca_mailto_form (simple email form)
Yeah im guessing its something to do with MSN… a lot of emails go ‘missing’ at the moment. I have found a way around it using forwarders.
Offline
Re: dca_mailto_form (simple email form)
If anyone’s interested I edited the code to produce a contact form inside a table, in a similar format to the comments forms.
<pre><code> $form = array( '<form method="post" action="'.$_SERVER['PHP_SELF'].'">', '<table cellpadding="4" cellspacing="0" border="0">', '<tr><td align="right" valign="top">' . 'name'. '</td><td valign="top">' . fInput('text','sender_name',$sender_name) . '</td></tr>', '<tr><td align="right" valign="top">' . 'email'. '</td><td valign="top">' . fInput('text','sender_email',$sender_email) . '</td></tr>', '<tr><td align="right" valign="top">' . 'subject'. '</td><td valign="top">' . fInput('text','sender_subject',$sender_subject) . '</td></tr>', '<tr><td align="right" valign="top">' . 'message'. '</td><td valign="top">' . text_area('message',160,300,$message) . '</td></tr>', '<tr><td align="right" valign="top"> </td><td valign="top">' . fInput('submit','send','Send') . '</td></tr></table>', '</form>' ); </code></pre>
Place this in place of the current $form = array (…. section.
billboard, you can change the height/width of the form in the code, in the line that says “text_area(‘message’,300,300,$message)” – the first number is the height, the second is the width of the message field.
Last edited by jimb (2004-09-12 02:19:55)
Offline
Re: dca_mailto_form (simple email form)
also, billboard, if you want to change the confirmation text to be h3 tags, change this line in the code:
<pre><code> return graf('Message has been sent'); </code></pre>
to say this:
<pre><code> return '<h3>Message has been sent</h3>'; </code></pre>
Hope that helps
Last edited by jimb (2004-09-12 02:23:13)
Offline
Re: dca_mailto_form (simple email form)
billboard, jim,
or why not use TXP’s built in functions instead?
<code>return hed(‘Message has been sent’,3);</code>
Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: dca_mailto_form (simple email form)
I tried this plugin and found one nice big bug.
The From: row has been mixed up (atleast for my hosts e-mail server).
It should state <code>From: $sender_name <$sender_email></code>, not the other way around.
Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline