Contact form
robiso
released this
13 Aug 14:03
·
26 commits
to master
since this release
A contact form plugin for WonderCMS
Install instructions
- Copy URL to ZIP file: https://github.com/robiso/wondercms-plugins/releases/download/contact-form-2.4/contact_form.zip
- Paste URL in Settings->Themes & plugins
Put the code below in your theme.php to display the contact form on all pages.
- Important: make sure to change [email protected] to your actual email
<?php
global $contact_form_email;
$contact_form_email = "[email protected]";
?>
<div class="container">
<div class="col-xs-12 col-md-6 col-md-offset-3">
<div id="contactform" class="grayFont">
<?php contact_form(); ?>
</div>
</div>
</div>
Save the changed theme.php and that's it!
How to display form on a specific page
- Change 'the name of the page' in the code below and add it to your theme.php (to show it on that specific page)
- Make sure 'the name of the page' exists.
<?php if (wCMS::$currentPage == 'the name of the page'): ?>
<?php
global $contact_form_email;
$contact_form_email = "[email protected]";
?>
<div class="container marginTop20">
<div class="col-xs-12 col-md-6 col-md-offset-3">
<div id="contactform" class="grayFont" style="height: 265px;">
<?php contact_form(); ?>
</div>
</div>
</div>
<?php endif ?>