Page 1 of 1
contactform-plugin: change submit-button
Posted: Wed Apr 04, 2007 11:54 am
by orang
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.
Stefan
Posted: Wed Apr 04, 2007 1:08 pm
by d_cee
Hi
you can change this in /lang/serendipity_lang_en.inc.php or /lang/utf8/serendipity_lang_en.inc.php if the default language for your blog is UTF8.
change this line
@define('SUBMIT_COMMENT', 'Submit Comment');
to
@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 serendipity_lang_de.inc.php instead
HTH
Dave
Posted: Wed Apr 04, 2007 10:59 pm
by orang
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
Stefan
Posted: Thu Apr 05, 2007 11:37 am
by garvinhicking
Hi!
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" />
{else}
<input type="submit" name="serendipity[submit]" value="Submit This with a different name" />
{/if}
You can add multiple if's to check all kinds of pagetitles then.
Best regards,
Garvin