Skip to content

Contact form

Compare
Choose a tag to compare
@robiso robiso released this 13 Aug 14:03
· 26 commits to master since this release
af4a85d

A contact form plugin for WonderCMS

Install instructions

  1. Copy URL to ZIP file: https://github.com/robiso/wondercms-plugins/releases/download/contact-form-2.4/contact_form.zip
  2. Paste URL in Settings->Themes & plugins

Put the code below in your theme.php to display the contact form on all pages.

<?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

  1. Change 'the name of the page' in the code below and add it to your theme.php (to show it on that specific page)
  2. 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 ?>