contactform-plugin: change submit-button

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Posts: 18
Joined: Wed Aug 16, 2006 9:03 am

contactform-plugin: change submit-button

Post by orang » Wed Apr 04, 2007 11:54 am

Hi there,

I installed successfully the contactform-plugin: it's really great! But I'd like to use it not really as an contact but rather as a form were people can subscribe themselves to events. And therefore I would like to change the value of the submit button and also the the text which is shown just right above the the submit button. Does anybody know how I can arrange that? I've already looked at the .tpl-files as well as on the .php-file but couldn't see where the variables are set.

Would be great, thank's.

Posts: 603
Joined: Wed Jan 18, 2006 7:32 pm
Location: UK

Post by d_cee » Wed Apr 04, 2007 1:08 pm


you can change this in /lang/ or /lang/utf8/ if the default language for your blog is UTF8.

change this line
@define('SUBMIT_COMMENT', 'Submit Comment');
@define('SUBMIT_COMMENT', 'Subscribe');

if that's what you want it to say

These are instructions for the english language files, if your blog is in German the you would change the instead



Posts: 18
Joined: Wed Aug 16, 2006 9:03 am

Post by orang » Wed Apr 04, 2007 10:59 pm

Hi Dave,

thanks very much for your reply. The thing is, in the future I would maybe like to set up another contact form on these sites, which then would be a "real" contact form. So if I change now these global variable, then all future contact forms will have as well a button "Subscribe". And that I don't want. My question was rather if there is a possiblity to change this within the plugin-files? Or can I just put up a new variable just for this case? As I haven't done such a thing before I don't really know how complex this would be?

Do you know any solution? Thank you, I appreciate your help

User avatar
Core Developer
Posts: 30014
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Post by garvinhicking » Thu Apr 05, 2007 11:37 am


In that case you must edit the plugin_contactform*.tpl files, search for {$CONST.SUBMIT_...} and then enter the constant there.

To support multiple contactforms with different names, you will need to add IF-statements to the templateform, like:

Code: Select all

{if $plugin_contactform_pagetitle == 'mypagetitle1'}
<input type="submit" name="serendipity[submit]" value="Submit Comment" />
<input type="submit" name="serendipity[submit]" value="Submit This with a different name" />

You can add multiple if's to check all kinds of pagetitles then.

Best regards,
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy:
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby:

Post Reply