Hx Tags

This is an H1

This is an H2

This is an H3

This is an H4

This is an H5
This is an H6

Body Copy

This is a paragraph Tag. Using the mark tag, del tag and s tag.

This is bolded text and strong text

This is italic text


Buttons

Button Sizes


Block Level Buttons

Images


Ordered List

  1. Ordered list item
  2. Ordered list item
  3. Ordered list item
    1. Ordered list sub-item
    2. Ordered list sub-item
    3. Ordered list sub-item

Unordered List

  • Unordered list item
  • Unordered list item
  • Unordered list item
    • Unordered list sub-item
    • Unordered list sub-item
    • Unordered list sub-item

Unstyled List

  • Unstyled unordered list item
  • Unstyled unordered list item
  • Unstyled unordered list item
    • Unstyled unordered list sub-item
    • Unstyled unordered list sub-item
    • Unstyled unordered list sub-item

Blockquotes

Text outside of a paragraph tag

Text inside of a paragraph tag

With a cite tag

Code Tag

For example, <section> should be wrapped as inline.

Pre Tag

Example text wrapped in pre tag
	                	Test
					

Form Fields

Checkbox

Radio

Inline Form

@

Horizontal Form


Contextual Backgrounds

bg-primary

bg-success

bg-info

bg-warning

bg-danger


Button Groups




Checkboxes and radio addons

Pagination


Labels

Default Primary Success Info Warning Danger

Badges

Inbox 42


Jumbotron

Hello, world!

This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.

Learn more

Alerts


Progress Bar

60%
40% Complete (success)
20% Complete
60% Complete (warning)
80% Complete (danger)

Tooltip


Accordion

Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.

form-functions.php Functions

The form-functions.php file is found in the root of website. It's purpose is to send form submissions.

It is capable of sending mail via SMTP using the PHPMailer script or via PHP's built in mail() function.

 

form_add_field($title, $value, $type, $length);

Adds a title: value to the email.

$title Field Title. Example: Name, First Name, Company Name, Email
$value The value submitted through the form. Example: $_POST['name']
$type

The type of form field submitted.

  • input (input type = text)
  • textarea
  • radio (input type = radio)
  • checkbox (input type = checkbox)
  • option (select box)
$length: length of the title. Used to line up text when using plain text emails

 

form_add_line_break();

Creates a line break. <br /> in HTML email. \n\n in Plain Text email.

 

form_add_title($title);

Adds a title/heading to the email. <h3> in HTML email. ALL CAPS for Plain Text.

 

form_send($mailto, $from_name, $from_email, $replyto, $subject, $message, $attachment = '', $css = '', $form);

Sends the email.

$mailto To address
$from_name Name of the person sending the email
$replyto The reply to email address
$subject The subject of the email
$message The body of the email
$attachment

An array of attachments. Example:

$attachment['filename'][0] 	= 'attach_1.jpg';
$attachment['file'][0] 		= '/full/path/to/file/to/attach_1.jpg';

$attachment['filename'][2] 	= 'attach_2.jpg';
$attachment['file'][2] 		= '/full/path/to/file/to/attach_2.jpg';

$attachment['filename'][2] 	= 'attach_3.jpg';
$attachment['file'][2] 		= '/full/path/to/file/to/attach_3.jpg';
$css Additional raw css to add to email. Will be placed inside of <style></style> tags



Example Send script

 

// Name of Form - for database logging purposes
	$form_name = "Contact Form";

// Include form-functions.php or die
	if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/form-functions.php")) { include_once $_SERVER['DOCUMENT_ROOT'] . "/form-functions.php"; }
	else { die("<b>/form-functions.php</b> does not exist!"); }

// Run Spam Filter
	if (function_exists(run_spam_filter())) { run_spam_filter(); }

// Settings for this form
	$form_output 	= "plain_text";		// plain_text OR html  -- case sensitive
	$field_length 	= 17;				// Example: 'First Name:      ' <-- 17 chars
	$form_delivery 	= "phpmailer";		// phpmailer, mail

// Create output - note that the form_add_field function checks for blank entries so that you don't have to
	$msg .= form_add_field("First Name:", 			  	$_POST['first_name'], 		'input', $field_length);
	$msg .= form_add_field("Last Name:", 			 	$_POST['last_name'],		'input', $field_length);
	$msg .= form_add_field("Email:", 				 	$_POST['email'], 			'input', $field_length);

	$msg .= form_add_line_break();

	$msg .= form_add_field("Address:", 					$_POST['address'], 			'input', $field_length);
	$msg .= form_add_field("City:", 				 	$_POST['city'],    			'input', $field_length);

	$msg .= form_add_line_break();

	$msg .= form_add_field("Services:", 				$_POST['services'], 	   	'checkbox', $field_length);
	$msg .= form_add_field("Options:", 					$_POST['option'], 	   		'radio', $field_length);

	$msg .= form_add_line_break();

	$msg .= form_add_field("Comments:", 				$_POST['comments'],		 	'textarea', $field_length);





// Email details - feel free to change as you see fit

	$toEmails = array('gary@linkweb.ca'); 			// Who should receive this email?
	$subject = "Sample Contact Us Submission";      // Subject of email. ALWAYS include the client company name

	if ($_POST['name']) { $from_name = $_POST['name']; }
	else if ($_POST['first_name']) { $from_name = $_POST['first_name'] . " " . $_POST['last_name']; }
	else if ($_POST['firstname']) { $from_name = $_POST['firstname'] . " " . $_POST['lastname']; }


	// Send the email to each recipient listed in the $toEmails array
		foreach ($toEmails as $key=>$address) {
			form_send($address, $from_name, $_POST['email'], $_POST['email'], $subject, $msg, $attachment, $css, $form_name);
		}



/* Begin Form Submission Logging */
	$fields = $_POST;	$fields['ip'] = $_SERVER['REMOTE_ADDR'];	$fields['form_url'] = $_SERVER['HTTP_REFERER']; 	$fields['form'] = $form;
	foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }		rtrim($fields_string, '&');
	$ch = curl_init();
	$url = "http://lwdwebservices.com/scripts/form-submission.php";
	curl_setopt($ch,CURLOPT_URL, $url);
	curl_setopt($ch,CURLOPT_POST, count($fields));
	curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
	$result = curl_exec($ch);
	curl_close($ch);
/* End Form Submission Logging */