News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Advanced Contact Form

Started by Deprecated, September 26, 2008, 06:15:53 PM

Previous topic - Next topic

SONSiVRi

Quote from: Mr. Pirate on February 28, 2010, 07:18:50 PM
How can i add a dropdown box that says category and they can select like feedback/report error/other under subject??

Search in the Contact.template.php file;
//--------------------------------------------------------------------------------------------------
// Subject line
//--------------------------------------------------------------------------------------------------

You can realize how user interface is created. Each row (subject, email, name...) is divided by <div> tags. You need to create new <div> section and add those lines below as a content;
<select name="category" id="category">
  <option>help</option>
  <option>suggestion</option>
</select>


Also you need to add code that captures this dropdown's value and adds in email content. Search this line in Contact.php
$content .= stripslashes($message);

Add this code above of it (if you want category name is placed above user's message);

$content .= isset($_POST['category']) ? trim($_POST['category']) : '';


I didn't test the codes, I just made it up. In case doesn't work, it will show you direction. Hope it helps.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Mr. Pirate

how can i make it where if they pick "other" there's something that pops under it that says "Please Specify"

SONSiVRi

Its HTML question and I don't have an answer for you. But its easy to rip off from site that you know exist.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Saxon044

Just a small irritation....

I hope someone can help me out here - The form works perfectly on my 2 RC3 forum, but the menu button text is in uppercase! (i.e. CONTACT). Please, please tell me where the text for the button is held so I can edit it to read "Contact"?

SONSiVRi

Quote from: Saxon044 on April 07, 2010, 05:17:26 PM
Just a small irritation....

I hope someone can help me out here - The form works perfectly on my 2 RC3 forum, but the menu button text is in uppercase! (i.e. CONTACT). Please, please tell me where the text for the button is held so I can edit it to read "Contact"?
/Themes/default/languages/Modifications.english.php
$txt['contact_form_default_tab_label'] = 'CONTACT';
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Saxon044

Thnk you for your help. I found and changed CONTACT to Contact in the file you suggested. But the button remains CONTACT! Wierd!

SONSiVRi

Quote from: Saxon044 on April 09, 2010, 06:48:37 PM
Thnk you for your help. I found and changed CONTACT to Contact in the file you suggested. But the button remains CONTACT! Wierd!
The code displays your button is;
'title' => !empty($modSettings['contact_form_tab_label']) ? $modSettings['contact_form_tab_label'] : $txt['contact_form_default_tab_label'],
It seems there is a settings entry in your admin panel somewhere, you have to change from there.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

FlatFX


This happens when I try to send the source code of the contact page in a message.

CommanderMadi

Hello Mate, that mod is GREAT, I thank you very much.

Just one problem considering it, All emails go to junk and I went to error logs to see if there are any, it gave that error:

Undefined Variable: hostName

I think this might be the reason of the sending to junk..

Any help would be greatly appreciated.

Thank you
Relationships counselling and advice blog
http://www.adorology.com

SONSiVRi

Quote from: madikingofkings on June 07, 2010, 04:10:08 PM
Hello Mate, that mod is GREAT, I thank you very much.

Just one problem considering it, All emails go to junk and I went to error logs to see if there are any, it gave that error:

Undefined Variable: hostName

I think this might be the reason of the sending to junk..

Any help would be greatly appreciated.

Thank you

I remember hostName is for a lookup, resolving sender's IP. There is no relation I guess.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

CommanderMadi

Ok, so what am I supposed to do with it, Sony?
Relationships counselling and advice blog
http://www.adorology.com

SONSiVRi

My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

CommanderMadi

Relationships counselling and advice blog
http://www.adorology.com

SONSiVRi

My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Scratching my Head

May I ask? I have installed this mod - installed no problem.

But where is the page supposed to show up?
I don't see it anywhere?

I can configure it fine, but where is the contact page once it's installed?
How do I navigate to it?


SONSiVRi

Quote from: Scratching my Head on June 11, 2010, 04:13:39 PM
May I ask? I have installed this mod - installed no problem.

But where is the page supposed to show up?
I don't see it anywhere?

I can configure it fine, but where is the contact page once it's installed?
How do I navigate to it?



In the top menu, beside "help search profile ..."
You need to manual install if you have custom theme.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Scratching my Head

Yeah. I installed it for the custom theme, but I couldn't find it.

Thanks anyway.

SONSiVRi

Quote from: Scratching my Head on June 12, 2010, 05:47:16 PM
Yeah. I installed it for the custom theme, but I couldn't find it.

Thanks anyway.

There is no permission required I presume. Which codes you are applied to your custom theme, I mean did you parsed it here?
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Scratching my Head

Parsed, and installed per the parser. That's why I was confused when it didn't show; and wondered if there was a specific url I could tap -- for instance:

hxxp://somedomain.com/forum/index.php?=contactpage - or whatever -- since I didn't see it on the default curve theme or the custom theme.

SONSiVRi

Quote from: Scratching my Head on June 13, 2010, 05:27:20 PM
Parsed, and installed per the parser. That's why I was confused when it didn't show; and wondered if there was a specific url I could tap -- for instance:

hxxp://somedomain.com/forum/index.php?=contactpage - or whatever -- since I didn't see it on the default curve theme or the custom theme.

Yes, there is a specific url; http://www.domain.com/forum/index.php?action=contact

Btw, I checked button codes that you need to apply on your custom theme, and there is a modSettings condition to display button. So you have to enable those options via your admin panel if haven't to do so.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Advertisement: