@robiso robiso released this Aug 13, 2017 · 2 commits to master since this release

Assets 3

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 anywhere you want to display it

<?php
	global $contact_form_email;
	$contact_form_email = "your.email@example.com";
?>

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

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 = "your.email@example.com";
	?>

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