Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Contact Us Form Error
#1
Hi There,

Having an issue with my contact us form.

I've inserted the appropriate code into my contact template:
Code:
<form action="<?php get_page_url(); ?>" method="post" class="contactform" >
            <?php set_contact_page(); ?>
            <div><b>Name:</b> <input class="text" type="text" value="<?php if (isset($_POST['contact']['name'])) { print($_POST['contact']['name']); } ?>" name="contact[name]" /></div>
            <div><b>Email:</b> <input class="text" type="text" value="<?php if (isset($_POST['contact']['email'])) { print($_POST['contact']['email']); }?>" name="contact[email]" /></div>
            <div><b>Subject:</b> <input class="text" type="text" value="<?php if (isset($_POST['contact']['subject'])) { print($_POST['contact']['subject']); }?>" name="contact[subject]" /></div>
            <div><b>Message:</b> <textarea class="text" name="contact[body]" ><?php if (isset($_POST['contact']['body'])) { print($_POST['contact']['body']); } ?></textarea></div>
            <div class="pot" ><input class="text" type="text" value="" name="contact[pot]" /></div>
            <div><input type="submit" value="Send Email" id="contact-submit" name="contact-submit" /></div>
        </form>

When i submit no text comes up on the page.

In the html, i get this:
<p class="contactmsg success"></p>

When i turn on debug mode, i see this in the form before submitting:

Notice: Constant GSIMAGEWIDTH already defined in /Applications/MAMP/htdocs/jmhconsulting.com.au/gsconfig.php on line 16
Notice: Constant GSDEBUG already defined in /Applications/MAMP/htdocs/jmhconsulting.com.au/gsconfig.php on line 19
Notice: Undefined variable: i18n in /Applications/MAMP/htdocs/jmhconsulting.com.au/admin/inc/contactform.php on line 53
Notice: Undefined variable: i18n in /Applications/MAMP/htdocs/jmhconsulting.com.au/admin/inc/contactform.php on line 72
Notice: Undefined variable: i18n in /Applications/MAMP/htdocs/jmhconsulting.com.au/admin/inc/contactform.php on line 72
Notice: Undefined variable: i18n in /Applications/MAMP/htdocs/jmhconsulting.com.au/admin/inc/contactform.php on line 102

After i see:
Notice: Constant GSIMAGEWIDTH already defined in /Applications/MAMP/htdocs/jmhconsulting.com.au/gsconfig.php on line 16
Notice: Constant GSDEBUG already defined in /Applications/MAMP/htdocs/jmhconsulting.com.au/gsconfig.php on line 19
Notice: Undefined variable: i18n in /Applications/MAMP/htdocs/jmhconsulting.com.au/admin/inc/contactform.php on line 72
Notice: Undefined variable: i18n in /Applications/MAMP/htdocs/jmhconsulting.com.au/admin/inc/contactform.php on line 72
Notice: Undefined variable: i18n in /Applications/MAMP/htdocs/jmhconsulting.com.au/admin/inc/contactform.php on line 102

What i find, is i cannot echo
i18n['anything']

Which suggests something is wrong with the language file, however i also do not receive an email.
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#2
I should write a simple email plugin.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#3
I think we should phase this out of the standard build as soon as possible anyway. Different people have been reporting problems with it and we’d much rather see a plugin for it anyway. Need to ask though, what version of GetSimple are we talking about? A couple of different ones are going around at the same time currently.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#4
I'm currently using the r3 beta of 2

It's all good, i'll just find a form mailer Smile
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#5
Ziggy, I'm working on the plugin and it should be done very soon.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#6
at the top of /admin/inc/contactform.php can you add this code, right above the "//debugging"? Let me know what happens.
Code:
global $i18n;
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#7
Sure, give me a ti cand i'll ftp in and add it.
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#8
Well that's done the job as far as the text now displays ('Your email has successfully been sent')

However the email still is not. Do i need to configure something in the config for it? smtp server perhaps?

Debug mode only shows:
Notice: Constant GSIMAGEWIDTH already defined in /home/wwwinsp/public_html/adamwolfs/clients/jmhconsulting.com.au/gsconfig.php on line 16
Notice: Constant GSDEBUG already defined in /home/wwwinsp/public_html/adamwolfs/clients/jmhconsulting.com.au/gsconfig.php on line 19
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#9
Oops i was wrong, email does show up! yay Big Grin

Was just in junk. So yeah, just needs the global call at the top!
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#10
Just finished, captcha and all.

http://internet54.com/getsimple/simple-contact-plugin
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#11
Looks good thus far! would you be offended if i took it, and built on top of it?

Happy to upload and give credit.
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#12
Like the first thing is i would like to create an admin section to allow the settings to be set.

Also would like for people to be able to set their own fields in the form Smile
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#13
crashfellow Wrote:Like the first thing is I would like to create an admin section to allow the settings to be set.
Also would like for people to be able to set their own fields in the form Smile
Are you going to work on this, crashfellow? Or are you, internet54? If neither, I have some time today so I might be able to create a nice admin interface for a contact form.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#14
Hey Zeg, Well it's not my plugin so it's really up to internet54 Smile if you wanna do it, i don't mind if you go for it.
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#15
That is what I have planned for the plugin, but if you guys want to fight over it, by all means fight.

If you are going to expand on it, please make it as simple and easy to use as possible.

Thanks.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#16
No fighting will occur lol your plugin man Smile this was pure speculation as it depended on how far you wanted to go with it Smile can't wait to see how it goes!
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#17
I like fighting Wink

I'll work a little more on it tonight when I get home. I just fixed a variable issue and implemented a multi-captcha system.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#18
Haha fair enough. Ok look forward to seeing the future builds.
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#19
@internet54 - Thanks for the plugin, it saved me a bit of a headache just now. Of course I had to rewrite the output a bit to fit my (HTML5) construction, but that was expected and no problems. Much appreciated.
There's nothing more foolish than a man chasing his hat.
Reply
#20
Thanks Fred. I'm looking to update it soon, but paid work persists Smile
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#21
Installed the contact-plugin and I tried implementing the code into my contact.php template page but the form is not showing up.

<div class="postcontent">
<?php if (function_exists('sc_show')) { sc_show(); } ?>
</div>

Not sure what i am doing wrong.
Reply
#22
Did you select the contact.php page as the template for your contact page under page options?
If so, please reinstall the plugin to be sure there is no problem there either.

Still nothing turning up? No PHP errors either? You might want to enable debug mode to be able to find certain errors for us to look into.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#23
Tried in debug mode and got some php errors on the plugin...

Notice: Undefined variable: thisfile in public_html/fleetafrica/plugins/simple-contact.php on line 103
Notice: Undefined variable: thisfile in public_html/fleetafrica/plugins/simple-contact.php on line 104

Lines 103 and 104 in plugin are...
add_action('content-top', 'sc_mail', array($thisfile, 'Simple Contact'));
add_action('content-bottom', 'sc_form', array($thisfile, 'Simple Contact'));
Reply
#24
In the plugins topic here on the forums internet54 published the fix for that. Apparently he hasn’t updated his downloadable plugin yet.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#25
thanks. tried the fix and got no errors but the form did not show using the function
<?php if (function_exists('sc_show')) { sc_show(); } ?>

I instead used the following functions on the contact page and works fine now.
<?php if (function_exists('sc_mail')) { sc_mail(); } ?>
<?php if (function_exists('sc_form')) { sc_form(); } ?>
Reply




Users browsing this thread: 1 Guest(s)