forked from rmcvey/PHP-Markdown-Forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.php
33 lines (28 loc) · 787 Bytes
/
example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
require_once 'forms_markdown.php';
/*
EXAMPLE SYNTAX/USAGE
form=action:processor.php|onsubmit:return check(this)|class:validate form|id:my_form|method:post
-----------------------------*/
$content =<<<BEGIN
form_title=This is my form
form_header=Fill out this form and magic will happen
form_footer=Thanks for filling out our form
First Name*=__[50]
Last Name*=_____[50]
<div class="contact-container">
Phone*=__(444) 555 - 5555
Address=__
City=__
State=__[2]
</div>
Are you interested?*= (x) yes () no () not sure
How many do you want?*= [x] 10 [x] 5 [] 2 [] 0
Lights*=|on|off
Slider*=5--10--50[5]
When do you want it?={Now, (Tomorrow), Never}
Comments="Enter any comments you have for us"
BEGIN;
$markdown = new forms_markdown($content);
print_r($markdown->toHTML());
?>