Custom Contact Forms - Version 4.0.0.b5

Version Description

Popover forms will be added in September 2010.

Download this release

Release Info

Developer tlovett1
Plugin Icon 128x128 Custom Contact Forms
Version 4.0.0.b5
Comparing to
See all releases

Code changes from version 3.5.10 to 4.0.0.b5

css/custom-contact-forms-admin.css CHANGED
@@ -19,21 +19,6 @@
19
  height:25px;
20
  padding: 7px 0 0 9px;
21
  }
22
- #customcontactforms-admin a.rate-me {
23
- background-color:#FFFF99;
24
- width:920px;
25
- border:1px solid #666666;
26
- padding:7px;
27
- display:block;
28
- text-align:center;
29
- margin:.5em 0 .8em 5px;
30
- -moz-border-radius:11px;
31
- -webkit-border-radius:11px;
32
- border-radius:11px;
33
- -moz-box-shadow:0 0 1px #123;
34
- -webkit-box-shadow: 0 0 1px #123;
35
- box-shadow:0 0 1px #123;
36
- }
37
  #customcontactforms-admin #instructions {
38
  float:left;
39
  clear:none;
@@ -70,6 +55,43 @@
70
  margin:20px 1em 1em 5px;
71
  }
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  #customcontactforms-admin #form-submissions {
74
  clear:both;
75
  width:1000px;
@@ -87,6 +109,20 @@
87
  #customcontactforms-admin #form-submissions table.second { margin-left:48%; border-collapse:collapse; width:48%; }
88
 
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  #customcontactforms-admin #field-options {
91
  clear:both;
92
  width:1000px;
@@ -134,21 +170,6 @@
134
  text-align:center;
135
  padding:6px 0 0 0;
136
  }
137
- #customcontactforms-admin a.rate-me {
138
- background-color:#FFFF99;
139
- width:920px;
140
- border:1px solid #666666;
141
- padding:7px;
142
- display:block;
143
- text-align:center;
144
- margin:.5em 0 .8em 5px;
145
- -moz-border-radius:11px;
146
- -webkit-border-radius:11px;
147
- border-radius:11px;
148
- -moz-box-shadow:0 0 1px #123;
149
- -webkit-box-shadow: 0 0 1px #123;
150
- box-shadow:0 0 1px #123;
151
- }
152
  #customcontactforms-admin #field-options .action { width:155px; }
153
  #customcontactforms-admin #field-options .option-value { width:125px; }
154
  #customcontactforms-admin #field-options .create-field-options-header {
@@ -192,6 +213,8 @@
192
  width:1000px;
193
  margin:20px 1em 1em 5px;
194
  }
 
 
195
  #customcontactforms-admin #create-styles .style_left { float:left; width:48% }
196
  #customcontactforms-admin #create-styles .style_right { width:48%; margin-left:51%; clear:none }
197
  #customcontactforms-admin #plugin-news {
@@ -326,6 +349,9 @@
326
  -webkit-box-shadow: 0 0 14px #123;
327
  box-shadow:0 0 14px #123;
328
  }
 
 
 
329
  #ccf-usage-popover div.popover-header {
330
  background-color:#efefef;
331
  padding:9px 9px 9px 20px;
@@ -350,7 +376,7 @@
350
  overflow:scroll;
351
  position:absolute;
352
  bottom:0px;
353
- top:2.4em;
354
  padding:3px;
355
  }
356
  #ccf-usage-popover div.popover-body ul { margin:5px 0px 5px 8px; padding:0; border-top:1px solid #efefef; }
@@ -472,4 +498,5 @@
472
  text-decoration:none;
473
  color:#000;
474
  font-size:16px;
475
- }
 
19
  height:25px;
20
  padding: 7px 0 0 9px;
21
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  #customcontactforms-admin #instructions {
23
  float:left;
24
  clear:none;
55
  margin:20px 1em 1em 5px;
56
  }
57
 
58
+ #customcontactforms-admin a.rate-me {
59
+ background-color:#FFFEEB;
60
+ width:920px;
61
+ border:1px solid #cccccc;
62
+ padding:7px;
63
+ display:block;
64
+ text-align:center;
65
+ margin:.5em 0 .8em 5px;
66
+ -moz-border-radius:11px;
67
+ -webkit-border-radius:11px;
68
+ border-radius:11px;
69
+ }
70
+ .ccf-tooltip {
71
+ background-color:#FFFEEB;
72
+ border:2px solid #666666;
73
+ padding:10px 15px;
74
+ width:200px;
75
+ -moz-border-radius:9px;
76
+ -khtml-border-radius:9px;
77
+ -webkit-border-radius:9px;
78
+ border-radius:9px;
79
+ display:none;
80
+ color:#333333;/*#D54E21;*/
81
+ font-weight:bold;
82
+ font-family:Verdana, Arial, Helvetica, sans-serif;
83
+ text-align:left;
84
+ font-size:10px;
85
+ -moz-box-shadow:0 0 6px #123;
86
+ -webkit-box-shadow: 0 0 6px #123;
87
+ box-shadow:0 0 6px #123;
88
+ }
89
+ #customcontactforms-admin .toollink {
90
+ text-decoration:none;
91
+ }
92
+ #customcontactforms-admin a.rate-me span { font-weight:bold }
93
+ #customcontactforms-admin .rate-me a span { text-decoration:underline }
94
+
95
  #customcontactforms-admin #form-submissions {
96
  clear:both;
97
  width:1000px;
109
  #customcontactforms-admin #form-submissions table.second { margin-left:48%; border-collapse:collapse; width:48%; }
110
 
111
 
112
+ #customcontactforms-admin #import-export {
113
+ clear:both;
114
+ width:1000px;
115
+ margin:20px 1em 1em 5px;
116
+ }
117
+ #customcontactforms-admin #import-export .export { margin:0; padding:0 0 12px 0; }
118
+ #customcontactforms-admin #import-export .import { padding:9px 0 0px 0; border-top:1px solid #cccccc; }
119
+ #customcontactforms-admin #import-export .import .choose_import { font-size:1.1em; clear:both; font-weight:bold; }
120
+ #customcontactforms-admin #import-export .import input[type=file] { margin:6px; }
121
+ #customcontactforms-admin #import-export .import ul { margin:6px; }
122
+ #customcontactforms-admin #import-export .import ul li { width:130px; float:left; }
123
+ #customcontactforms-admin #import-export .import ul li label { font-size:.9em; }
124
+ #customcontactforms-admin #import-export p { padding:0 0 5px 0; margin:0; }
125
+
126
  #customcontactforms-admin #field-options {
127
  clear:both;
128
  width:1000px;
170
  text-align:center;
171
  padding:6px 0 0 0;
172
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  #customcontactforms-admin #field-options .action { width:155px; }
174
  #customcontactforms-admin #field-options .option-value { width:125px; }
175
  #customcontactforms-admin #field-options .create-field-options-header {
213
  width:1000px;
214
  margin:20px 1em 1em 5px;
215
  }
216
+ #customcontactforms-admin #create-styles .inside,
217
+ #customcontactforms-admin #create-styles form { margin-top:0px; padding-top:0 }
218
  #customcontactforms-admin #create-styles .style_left { float:left; width:48% }
219
  #customcontactforms-admin #create-styles .style_right { width:48%; margin-left:51%; clear:none }
220
  #customcontactforms-admin #plugin-news {
349
  -webkit-box-shadow: 0 0 14px #123;
350
  box-shadow:0 0 14px #123;
351
  }
352
+ #ccf-usage-popover #popover-tof { text-align:center; border-bottom:1px #ccc dashed; margin:5px 0 10px 0; padding:0 0 6px 0; }
353
+ #ccf-usage-popover #popover-tof li { display:inline; padding:0 2px 0 3px;
354
+ }
355
  #ccf-usage-popover div.popover-header {
356
  background-color:#efefef;
357
  padding:9px 9px 9px 20px;
376
  overflow:scroll;
377
  position:absolute;
378
  bottom:0px;
379
+ top:3em;
380
  padding:3px;
381
  }
382
  #ccf-usage-popover div.popover-body ul { margin:5px 0px 5px 8px; padding:0; border-top:1px solid #efefef; }
498
  text-decoration:none;
499
  color:#000;
500
  font-size:16px;
501
+ }
502
+ .modal-wpspin { margin-left:5px; }
css/custom-contact-forms-standards.css CHANGED
@@ -5,10 +5,14 @@
5
  .red { color:#F00; }
6
  .bold { font-weight:bold; }
7
  .italic { font-style:italic; }
 
8
  .hide { display:none; }
9
  .clear { clear:both; }
10
  .textcenter { text-align:center; }
11
  .floatleft { float:left; }
12
  .floatright { float:right; }
13
  .form-extra-options-table { margin:0 auto 0 auto; }
14
- .evenrow { background-color:#f5f5f5; }
 
 
 
5
  .red { color:#F00; }
6
  .bold { font-weight:bold; }
7
  .italic { font-style:italic; }
8
+ .ccf-hide { display:none; }
9
  .hide { display:none; }
10
  .clear { clear:both; }
11
  .textcenter { text-align:center; }
12
  .floatleft { float:left; }
13
  .floatright { float:right; }
14
  .form-extra-options-table { margin:0 auto 0 auto; }
15
+ .evenrow { background-color:#f5f5f5; }
16
+ .alignright { text-align:right; }
17
+ .alignleft { text-align:right; }
18
+ .ccf-loading-icon { margin-left: 5px; margin-right:7px; }
css/custom-contact-forms.css CHANGED
@@ -65,8 +65,8 @@ form.customcontactform-sidebar div select { width:auto; }
65
  display:none;
66
  }
67
 
68
- .ccf-popover .ccf-popover-close { position:absolute; top:1px; right:5px; }
69
- .tooltip {
70
  background-color:#000;
71
  border:1px solid #fff;
72
  padding:10px 15px;
@@ -75,8 +75,6 @@ form.customcontactform-sidebar div select { width:auto; }
75
  color:#fff;
76
  text-align:left;
77
  font-size:12px;
78
-
79
- /* outline radius for mozilla/firefox only */
80
  -moz-box-shadow:0 0 10px #000;
81
  -webkit-box-shadow:0 0 10px #000;
82
  }
@@ -97,6 +95,9 @@ form.customcontactform-sidebar div select { width:auto; }
97
  left:30%;
98
  background-color:white;
99
  top:30%;
 
 
 
100
  }
101
  #ccf-form-success div {
102
  background-color:#efefef;
65
  display:none;
66
  }
67
 
68
+ .ccf-popover .ccf-popover-close { position:absolute; top:0px; right:5px; font-size:22px; }
69
+ .ccf-tooltip {
70
  background-color:#000;
71
  border:1px solid #fff;
72
  padding:10px 15px;
75
  color:#fff;
76
  text-align:left;
77
  font-size:12px;
 
 
78
  -moz-box-shadow:0 0 10px #000;
79
  -webkit-box-shadow:0 0 10px #000;
80
  }
95
  left:30%;
96
  background-color:white;
97
  top:30%;
98
+ -moz-box-shadow:0 0 14px #123;
99
+ -webkit-box-shadow: 0 0 14px #123;
100
+ box-shadow:0 0 14px #123;
101
  }
102
  #ccf-form-success div {
103
  background-color:#efefef;
custom-contact-forms-admin.php ADDED
@@ -0,0 +1,1234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="customcontactforms-admin">
2
+ <div id="icon-themes" class="icon32"></div>
3
+ <h2><?php _e("Custom Contact Forms", 'custom-contact-forms'); ?></h2>
4
+ <ul id="plugin-nav">
5
+ <li><a href="#instructions"><?php _e("Plugin Instructions", 'custom-contact-forms'); ?></a></li>
6
+ <li><a href="#general-settings"><?php _e("General Settings", 'custom-contact-forms'); ?></a></li>
7
+ <li><a href="#create-fields"><?php _e("Create Fields", 'custom-contact-forms'); ?></a></li>
8
+ <li><a href="#create-forms"><?php _e("Create Forms", 'custom-contact-forms'); ?></a></li>
9
+ <li><a href="#manage-fields"><?php _e("Manage Fields", 'custom-contact-forms'); ?></a></li>
10
+ <li><a href="#manage-fixed-fields"><?php _e("Manage Fixed Fields", 'custom-contact-forms'); ?></a></li>
11
+ <li><a href="#manage-forms"><?php _e("Manage Forms", 'custom-contact-forms'); ?></a></li>
12
+ <li><a href="#form-submissions"><?php _e("Saved Form Submissions (New!)", 'custom-contact-forms'); ?></a></li>
13
+ <li><a href="#create-styles"><?php _e("Create Styles", 'custom-contact-forms'); ?></a></li>
14
+ <li><a href="#manage-styles"><?php _e("Manage Styles", 'custom-contact-forms'); ?></a></li>
15
+ <li><a href="#manage-field-options"><?php _e("Manage Field Options", 'custom-contact-forms'); ?></a></li>
16
+ <li><a href="#contact-author"><?php _e("Suggest a Feature", 'custom-contact-forms'); ?></a></li>
17
+ <li><a href="#contact-author"><?php _e("Bug Report", 'custom-contact-forms'); ?></a></li>
18
+ <li><a href="#custom-html"><?php _e("Custom HTML Forms", 'custom-contact-forms'); ?></a></li>
19
+ <li><a href="#import-export"><?php _e("Import / Export (New!)", 'custom-contact-forms'); ?></a></li>
20
+ <li class="last"><a href="#plugin-news"><?php _e("Plugin News", 'custom-contact-forms'); ?></a></li>
21
+ </ul>
22
+ <a class="rate-me" href="http://wordpress.org/extend/plugins/custom-contact-forms" title="<?php _e("Rate This Plugin", 'custom-contact-forms'); ?>"><?php _e("We need your help to continue development! Please <span>rate this plugin</span> to show your support.", 'custom-contact-forms'); ?></a> <a name="create-fields"></a>
23
+ <div id="create-fields" class="postbox">
24
+ <h3 class="hndle"><span><?php _e("Create A Form Field", 'custom-contact-forms'); ?></span></h3>
25
+ <div class="inside">
26
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
27
+ <ul>
28
+ <li>
29
+ <label for="field_slug">* <?php _e("Slug (Name):", 'custom-contact-forms'); ?></label>
30
+ <input name="field[field_slug]" type="text" maxlength="40" />
31
+ <br />
32
+ <?php _e("(A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.)", 'custom-contact-forms'); ?></li>
33
+ <li>
34
+ <label for="field_label"><?php _e("Field Label:", 'custom-contact-forms'); ?></label>
35
+ <input name="field[field_label]" type="text" maxlength="100" />
36
+ <br />
37
+ <?php _e("(The field label is displayed next to the field and is visible to the user.)", 'custom-contact-forms'); ?> </li>
38
+ <li>
39
+ <label for="field_type">* <?php _e("Field Type:", 'custom-contact-forms'); ?></label>
40
+ <select name="field[field_type]">
41
+ <option>Text</option>
42
+ <option>Textarea</option>
43
+ <option>Hidden</option>
44
+ <option>Checkbox</option>
45
+ <option>Radio</option>
46
+ <option>Dropdown</option>
47
+ </select>
48
+ </li>
49
+ <li>
50
+ <label for="field_value"><?php _e("Initial Value:", 'custom-contact-forms'); ?></label>
51
+ <input name="field[field_value]" type="text" maxlength="50" />
52
+ <br />
53
+ (<?php _e("This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox
54
+ 'Are you human?', I would set the initial value to 'Yes'.", 'custom-contact-forms'); ?> <?php _e("If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the", 'custom-contact-forms'); ?> <a href="#manage-field-options" title="<?php _e("Create a Field Option", 'custom-contact-forms'); ?>"><?php _e("field option", 'custom-contact-forms'); ?></a> <?php _e("you would like initially selected.", 'custom-contact-forms'); ?>) </li>
55
+ <li>
56
+ <label for="field_maxlength"><?php _e("Max Length:", 'custom-contact-forms'); ?></label>
57
+ <input class="width50" size="10" name="field[field_maxlength]" type="text" maxlength="4" />
58
+ <br />
59
+ <?php _e("(0 for no limit; only applies to Text fields)", 'custom-contact-forms'); ?></li>
60
+ <li>
61
+ <label for="field_required">* <?php _e("Required Field:", 'custom-contact-forms'); ?></label>
62
+ <select name="field[field_required]">
63
+ <option value="0"><?php _e("No", 'custom-contact-forms'); ?></option>
64
+ <option value="1"><?php _e("Yes", 'custom-contact-forms'); ?></option>
65
+ </select>
66
+ <br />
67
+ <?php _e("(If a field is required and a user leaves it blank, the plugin will display an error message explainging the problem.)", 'custom-contact-forms'); ?></li>
68
+ <li>
69
+ <label for="field_value"><?php _e("Field Instructions:", 'custom-contact-forms'); ?></label>
70
+ <input name="field[field_instructions]" type="text" />
71
+ <br />
72
+ <?php _e("(If this is filled out, a tooltip popover displaying this text will show when the field is selected.)", 'custom-contact-forms'); ?> </li>
73
+ <li>
74
+ <input type="hidden" name="field[user_field]" value="1" />
75
+ <input type="submit" value="<?php _e("Create Field", 'custom-contact-forms'); ?>" name="field_create" />
76
+ </li>
77
+ </ul>
78
+ </form>
79
+ </div>
80
+ </div>
81
+ <a name="create-forms"></a>
82
+ <div id="create-forms" class="postbox">
83
+ <h3 class="hndle"><span><?php _e("Create A Form", 'custom-contact-forms'); ?></span></h3>
84
+ <div class="inside">
85
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
86
+ <ul>
87
+ <li>
88
+ <label for="form[form_slug]">* <?php _e("Form Slug:", 'custom-contact-forms'); ?></label>
89
+ <input type="text" maxlength="100" name="form[form_slug]" />
90
+ <br />
91
+ <?php _e("(Must be unique and contain only underscores and alphanumeric characters.)", 'custom-contact-forms'); ?></li>
92
+ <li>
93
+ <label for="form[form_title]"><?php _e("Form Title:", 'custom-contact-forms'); ?></label>
94
+ <input type="text" maxlength="200" name="form[form_title]" />
95
+ <?php _e("(The form header text)", 'custom-contact-forms'); ?></li>
96
+ <li>
97
+ <label for="form[form_method]">* <?php _e("Form Method:", 'custom-contact-forms'); ?></label>
98
+ <select name="form[form_method]">
99
+ <option>Post</option>
100
+ <option>Get</option>
101
+ </select>
102
+ <?php _e("(If unsure, leave as is.)", 'custom-contact-forms'); ?></li>
103
+ <li>
104
+ <label for="form[form_action]"><?php _e("Form Action:", 'custom-contact-forms'); ?></label>
105
+ <input type="text" name="form[form_action]" value="" />
106
+ <br />
107
+ <?php _e("(If unsure, leave blank. Enter a URL here, if and only if you want to process your forms somewhere else, for example with a service like Aweber or InfusionSoft.)", 'custom-contact-forms'); ?></li>
108
+ <li>
109
+ <label for="form[form_action]"><?php _e("Form Style:", 'custom-contact-forms'); ?></label>
110
+ <select name="form[form_style]" class="form_style_input">
111
+ <?php echo $style_options; ?>
112
+ </select>
113
+ (<a href="#create-styles"><?php _e("Click to create a style", 'custom-contact-forms'); ?></a>)</li>
114
+ <li>
115
+ <label for="form[submit_button_text]"><?php _e("Submit Button Text:", 'custom-contact-forms'); ?></label>
116
+ <input type="text" maxlength="200" name="form[submit_button_text]" />
117
+ </li>
118
+ <li>
119
+ <label for="form[custom_code]"><?php _e("Custom Code:", 'custom-contact-forms'); ?></label>
120
+ <input type="text" name="form[custom_code]" />
121
+ <br />
122
+ <?php _e("(If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.)", 'custom-contact-forms'); ?></li>
123
+ <li>
124
+ <label for="form[form_email]"><?php _e("Form Destination Email:", 'custom-contact-forms'); ?></label>
125
+ <input type="text" name="form[form_email]" />
126
+ <br />
127
+ <?php _e("(Will receive all submissions from this form; if left blank it will use the default specified in general settings.)", 'custom-contact-forms'); ?></li>
128
+ <li>
129
+ <label for="form[form_success_message]"><?php _e("Form Success Message:", 'custom-contact-forms'); ?></label>
130
+ <input type="text" name="form[form_success_message]" />
131
+ <br />
132
+ <?php _e("(Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.)", 'custom-contact-forms'); ?></li>
133
+ <li>
134
+ <label for="form[form_success_title]"><?php _e("Form Success Message Title:", 'custom-contact-forms'); ?></label>
135
+ <input type="text" name="form[form_success_title]" />
136
+ <br />
137
+ <?php _e("(Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.)", 'custom-contact-forms'); ?></li>
138
+ <li>
139
+ <label for="form[form_thank_you_page]"><?php _e("Custom Success URL:", 'custom-contact-forms'); ?></label>
140
+ <input type="text" name="form[form_thank_you_page]" />
141
+ <br />
142
+ <?php _e("(If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.)", 'custom-contact-forms'); ?></li>
143
+ <li>
144
+ <input type="submit" value="<?php _e("Create Form", 'custom-contact-forms'); ?>" name="form_create" />
145
+ </li>
146
+ </ul>
147
+ </form>
148
+ </div>
149
+ </div>
150
+ <a name="manage-fields"></a>
151
+ <h3 class="manage-h3"><?php _e("Manage User Fields", 'custom-contact-forms'); ?></h3>
152
+ <table class="widefat post" id="manage-fields" cellspacing="0">
153
+ <thead>
154
+ <tr>
155
+ <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
156
+ <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
157
+ <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
158
+ <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
159
+ <th scope="col" class="manage-column field-required"><?php _e("Required", 'custom-contact-forms'); ?></th>
160
+ <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
161
+ <th scope="col" class="manage-column field-action"><?php _e("Action", 'custom-contact-forms'); ?></th>
162
+ </tr>
163
+ </thead>
164
+ <tbody>
165
+ <?php
166
+ $fields = parent::selectAllFields();
167
+ for ($i = 0, $z = 0; $i < count($fields); $i++, $z++) {
168
+ if ($fields[$i]->user_field == 0) { $z--; continue; }
169
+ $attached_options = parent::getAttachedFieldOptionsArray($fields[$i]->id);
170
+ $field_types = '<option>Text</option><option>Textarea</option><option>Hidden</option><option>Checkbox</option><option>Radio</option><option>Dropdown</option>';
171
+ $field_types = str_replace('<option>'.$fields[$i]->field_type.'</option>', '<option selected="selected">'.$fields[$i]->field_type.'</option>', $field_types);
172
+
173
+ ?>
174
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
175
+ <tr<?php if ($z % 2 == 1) echo ' class="evenrow"'; ?>>
176
+ <td><input type="text" name="field[field_slug]" class="width100" maxlength="50" value="<?php echo $fields[$i]->field_slug; ?>" /></td>
177
+ <td><input type="text" name="field[field_label]" maxlength="100" value="<?php echo $fields[$i]->field_label; ?>" /></td>
178
+ <td><select name="field[field_type]">
179
+ <?php echo $field_types; ?>
180
+ </select></td>
181
+ <td><input type="text" name="field[field_value]" maxlength="50" class="width75" value="<?php echo $fields[$i]->field_value; ?>" /></td>
182
+ <td><select name="field[field_required]">
183
+ <option value="1"><?php _e("Yes", 'custom-contact-forms'); ?></option>
184
+ <option value="0" <?php if ($fields[$i]->field_required != 1) echo 'selected="selected"'; ?>><?php _e("No", 'custom-contact-forms'); ?></option>
185
+ </select></td>
186
+ <td><?php if ($fields[$i]->field_type == 'Dropdown' || $fields[$i]->field_type == 'Radio') { ?>
187
+ <b>-</b>
188
+ <?php } else { ?>
189
+ <input type="text" class="width50" name="field[field_maxlength]" value="<?php echo $fields[$i]->field_maxlength; ?>" />
190
+ <?php } ?>
191
+ </td>
192
+ <td><input type="hidden" class="object-type" name="object_type" value="field" />
193
+ <input type="hidden" class="object-id" name="fid" value="<?php echo $fields[$i]->id; ?>" />
194
+ <span class="fields-options-expand"></span>
195
+ <input type="submit" class="edit-button" name="field_edit" value="<?php _e("Save", 'custom-contact-forms'); ?>" />
196
+ <input type="submit" name="field_delete" class="delete-button" value="<?php _e("Delete", 'custom-contact-forms'); ?>" /></td>
197
+ </tr>
198
+ <?php $show_field_options = ($fields[$i]->field_type == 'Radio' || $fields[$i]->field_type == 'Dropdown') ? true : false; ?>
199
+ <tr<?php if ($z % 2 == 1) echo ' class="evenrow"'; ?>>
200
+ <td class="fields-extra-options" colspan="7">
201
+ <div class="field-instructions">
202
+ <label for="field_instructions"><?php _e("Field Instructions:", 'custom-contact-forms'); ?></label>
203
+ <input type="text" class="width150" name="field[field_instructions]" value="<?php echo $fields[$i]->field_instructions; ?>" />
204
+ <?php if ($show_field_options) echo '<br />'; ?>
205
+ <label for="field_class">
206
+ <?php _e("Field Class:", 'custom-contact-forms'); ?></label>
207
+ <input type="text" class="width100" name="field[field_class]" value="<?php echo $fields[$i]->field_class; ?>" />
208
+ <a href="javascript:void(0)" class="toollink" title="<?php _e('If you manage a .CSS file for your theme, you could create a class in that file and add it to this field. If the form attaching this field is using a "Form Style" other than the default, styles inherited from the "Field Class" might be overwritten.', 'custom-contact-forms'); ?>">(?)</a>
209
+ </div>
210
+ <?php
211
+ if ($show_field_options) { ?>
212
+ <div class="dettach-field-options">
213
+ <?php if (empty($attached_options)) { ?>
214
+ <select name="dettach_object_id">
215
+ <option value="-1">Nothing Attached!</option>
216
+ </select>
217
+ <?php } else { ?>
218
+ <select name="dettach_object_id" class="onObject<?php echo $fields[$i]->id ?> objectTypeField">
219
+ <?php
220
+ foreach ($attached_options as $option_id) {
221
+ $option = parent::selectFieldOption($option_id);
222
+ ?>
223
+ <option value="<?php echo $option_id; ?>"><?php echo $option->option_slug; ?></option>
224
+ <?php
225
+ }
226
+ ?>
227
+ </select>
228
+ <?php } ?>
229
+ <input type="submit" class="dettach-button" name="dettach_field_option" value="<?php _e("Dettach Field Option", 'custom-contact-forms'); ?>" />
230
+ <br />
231
+ <span class="red bold">*</span> <?php _e("Dettach field options you", 'custom-contact-forms'); ?> <a href="#create-field-options"><?php _e("create", 'custom-contact-forms'); ?></a>. </div>
232
+ <?php $all_options = $this->getFieldOptionsForm(); ?>
233
+ <div class="attach-field-options">
234
+ <?php if (empty($all_options)) { ?>
235
+ <b>No Field Options to Attach</b>
236
+ <?php } else { ?>
237
+ <select name="attach_object_id" class="onObject<?php echo $fields[$i]->id ?> objectTypeField">
238
+ <?php echo $all_options; ?>
239
+ </select>
240
+ <input type="submit" class="attach-button" name="attach_field_option" value="<?php _e("Attach Field Option", 'custom-contact-forms'); ?>" />
241
+ <?php } ?>
242
+ <br />
243
+ <span class="red bold">*</span> <?php _e("Attach field options in the order you want them to display.", 'custom-contact-forms'); ?> </div>
244
+ <?php } ?>
245
+ </td>
246
+ </tr>
247
+ </form>
248
+ <?php
249
+ }
250
+ ?>
251
+ </tbody>
252
+
253
+ <tfoot>
254
+ <tr>
255
+ <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
256
+ <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
257
+ <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
258
+ <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
259
+ <th scope="col" class="manage-column field-required"><?php _e("Required", 'custom-contact-forms'); ?></th>
260
+ <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
261
+ <th scope="col" class="manage-column field-action"><?php _e("Action", 'custom-contact-forms'); ?></th>
262
+ </tr>
263
+ </tfoot>
264
+ </table>
265
+ <a name="manage-fixed-fields"></a>
266
+ <h3 class="manage-h3"><?php _e("Manage Fixed Fields", 'custom-contact-forms'); ?></h3>
267
+ <table class="widefat post" id="manage-fixed-fields" cellspacing="0">
268
+ <thead>
269
+ <tr>
270
+ <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
271
+ <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
272
+ <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
273
+ <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
274
+ <th scope="col" class="manage-column field-value"><?php _e("Required", 'custom-contact-forms'); ?></th>
275
+ <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
276
+ <th scope="col" class="manage-column field-action"><?php _e("Action", 'custom-contact-forms'); ?></th>
277
+ </tr>
278
+ </thead>
279
+ <tbody>
280
+ <?php
281
+ $fields = parent::selectAllFields();
282
+ for ($i = 0, $z = 0; $i < count($fields); $i++, $z++) {
283
+ if ($fields[$i]->user_field == 1) { $z--; continue;}
284
+ $field_types = '<option>Text</option><option>Textarea</option><option>Hidden</option><option>Checkbox</option>';
285
+ $field_types = str_replace('<option>'.$fields[$i]->field_type.'</option>', '<option selected="selected">'.$fields[$i]->field_type.'</option>', $field_types);
286
+
287
+ ?>
288
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
289
+ <tr <?php if ($z % 2 == 0) echo ' class="evenrow"'; ?>>
290
+ <td><?php echo $fields[$i]->field_slug; ?></td>
291
+ <td><?php if ($fields[$i]->field_slug == 'resetButton') { _e('None', 'custom-contact-forms'); } else { ?>
292
+ <input type="text" name="field[field_label]" maxlength="100" value="<?php echo $fields[$i]->field_label; ?>" />
293
+ <?php } ?></td>
294
+ <td><?php echo $fields[$i]->field_type; ?>
295
+ <td><?php if ($fields[$i]->field_type != 'Checkbox') { ?>
296
+ <input type="text" name="field[field_value]" class="width75" maxlength="50" value="<?php echo $fields[$i]->field_value; ?>" />
297
+ <?php } else {
298
+ echo $fields[$i]->field_value;
299
+ ?>
300
+ <?php } ?>
301
+ </td>
302
+ <td><?php if ($fields[$i]->field_slug == 'fixedEmail') { ?>
303
+ <select name="field[field_required]">
304
+ <option value="1"><?php _e("Yes", 'custom-contact-forms'); ?></option>
305
+ <option <?php if($fields[$i]->field_required != 1) echo 'selected="selected"'; ?> value="0"><?php _e("No", 'custom-contact-forms'); ?></option>
306
+ </select>
307
+ <?php } else {
308
+ if ($fields[$i]->field_slug == 'resetButton') {
309
+ echo '-';
310
+ } else {
311
+ _e("Yes", 'custom-contact-forms');
312
+ }
313
+ }
314
+ ?>
315
+ </td>
316
+ <td><?php if ($fields[$i]->field_type != 'Checkbox' && $fields[$i]->field_slug != 'resetButton') { ?>
317
+ <input type="text" class="width50" name="field[field_maxlength]" value="<?php echo $fields[$i]->field_maxlength; ?>" />
318
+ <?php } else { _e('None', 'custom-contact-forms'); } ?>
319
+ </td>
320
+ <td><input type="hidden" class="object-type" name="object_type" value="field" />
321
+ <input type="hidden" class="object-id" name="fid" value="<?php echo $fields[$i]->id; ?>" />
322
+ <span class="fixed-fields-options-expand"></span>
323
+ <input type="submit" name="field_edit" class="edit-button" value="<?php _e("Save", 'custom-contact-forms'); ?>" /></td>
324
+ </tr>
325
+ <tr <?php if ($z % 2 == 0) echo ' class="evenrow"'; ?>>
326
+ <td class="fixed-fields-extra-options" colspan="7">
327
+ <label for="field_class"><?php _e('Field Class:', 'custom-contact-forms'); ?></label>
328
+ <input type="text" value="<?php echo $fields[$i]->field_class; ?>" name="field[field_class]" />
329
+ <?php if ($fields[$i]->field_slug != 'resetButton') { ?>
330
+ <label for="field_instructions"><?php _e("Field Instructions:", 'custom-contact-forms'); ?></label>
331
+ <input type="text" name="field[field_instructions]" class="width200" value="<?php echo $fields[$i]->field_instructions; ?>" />
332
+ <br /><?php } echo $GLOBALS['ccf_fixed_fields'][$fields[$i]->field_slug]; ?></td>
333
+ </tr>
334
+ </form>
335
+ <?php
336
+ }
337
+ ?>
338
+ </tbody>
339
+
340
+ <tfoot>
341
+ <tr>
342
+ <th scope="col" class="manage-column field-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
343
+ <th scope="col" class="manage-column field-label"><?php _e("Label", 'custom-contact-forms'); ?></th>
344
+ <th scope="col" class="manage-column field-type"><?php _e("Type", 'custom-contact-forms'); ?></th>
345
+ <th scope="col" class="manage-column field-value"><?php _e("Initial Value", 'custom-contact-forms'); ?></th>
346
+ <th scope="col" class="manage-column field-value"><?php _e("Required", 'custom-contact-forms'); ?></th>
347
+ <th scope="col" class="manage-column field-maxlength"><?php _e("Maxlength", 'custom-contact-forms'); ?></th>
348
+ <th scope="col" class="manage-column field-action"><?php _e("Action", 'custom-contact-forms'); ?></th>
349
+ </tr>
350
+ </tfoot>
351
+ </table>
352
+ <a name="manage-field-options"></a>
353
+ <div id="field-options" class="postbox">
354
+ <h3 class="hndle"><span><?php _e("Manage Field Options (for Dropdown and Radio Fields)", 'custom-contact-forms'); ?></span></h3>
355
+ <div class="inside">
356
+ <div class="option-header">
357
+ <div class="slug"><?php _e("Slug", 'custom-contact-forms'); ?></div>
358
+ <div class="label"><?php _e("Label", 'custom-contact-forms'); ?></div>
359
+ <div class="option-value"><?php _e("Value", 'custom-contact-forms'); ?></div>
360
+ <div class="action"><?php _e("Action", 'custom-contact-forms'); ?></div>
361
+ </div>
362
+ <table id="edit-field-options">
363
+ <?php
364
+ $options = parent::selectAllFieldOptions();
365
+ $i = 0;
366
+ foreach ($options as $option) {
367
+ ?>
368
+ <tr<?php if ($i % 2 == 1) echo ' class="evenrow-field-options"'; ?>>
369
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']?>">
370
+ <td class="slug"><input type="text" maxlength="20" name="option[option_slug]" value="<?php echo $option->option_slug; ?>" class="width50" /></td>
371
+ <td class="label"><input type="text" name="option[option_label]" value="<?php echo $option->option_label; ?>" class="width100" /></td>
372
+ <td class="option-value"><input type="text" name="option[option_value]" value="<?php echo $option->option_value; ?>" class="width100" /></td>
373
+ <td class="action"><input type="submit" value="<?php _e("Save", 'custom-contact-forms'); ?>" class="edit-button" name="edit_field_option" />
374
+ <input type="submit" class="delete-button" value="<?php _e("Delete", 'custom-contact-forms'); ?>" name="delete_field_option" />
375
+ </td>
376
+ <input type="hidden" class="object-type" name="object_type" value="field_option" />
377
+ <input type="hidden" class="object-id" name="oid" value="<?php echo $option->id; ?>" />
378
+ </form>
379
+ </tr>
380
+ <?php
381
+ $i++;
382
+ } if (empty($options)) {
383
+ ?>
384
+ <tr>
385
+ <td class="ccf-center"><?php _e("No field options have been created.", 'custom-contact-forms'); ?></td>
386
+ </tr>
387
+ <?php
388
+ }
389
+ ?>
390
+ </table>
391
+ <div class="option-header">
392
+ <div class="slug"><?php _e("Slug", 'custom-contact-forms'); ?></div>
393
+ <div class="label"><?php _e("Label", 'custom-contact-forms'); ?></div>
394
+ <div class="option-value"><?php _e("Value", 'custom-contact-forms'); ?></div>
395
+ <div class="action"><?php _e("Action", 'custom-contact-forms'); ?></div>
396
+ </div>
397
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']?>">
398
+ <input type="hidden" name="object_type" value="field_option" />
399
+ <div class="create-field-options-header"><?php _e("Create a Field Option", 'custom-contact-forms'); ?></div>
400
+ <ul id="create-field-options">
401
+ <li>
402
+ <label for="option[option_slug]">* <?php _e("Option Slug:", 'custom-contact-forms'); ?></label>
403
+ <input maxlength="20" type="text" name="option[option_slug]" />
404
+ <br />
405
+ <?php _e("(Used to identify this option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one')", 'custom-contact-forms'); ?></li>
406
+ <li>
407
+ <label for="option[option_label]">* <?php _e("Option Label:", 'custom-contact-forms'); ?></label>
408
+ <input type="text" name="option[option_label]" />
409
+ <br />
410
+ <?php _e("(This is what is shown to the user in the dropdown or radio field. Example:)", 'custom-contact-forms'); ?></li>
411
+ <li>
412
+ <label for="option[option_value]"><?php _e("Option Value:", 'custom-contact-forms'); ?></label>
413
+ <input type="text" name="option[option_value]" />
414
+ <br />
415
+ <?php _e('(This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: "The color green" => "green" or "Yes" => "1".)', 'custom-contact-forms'); ?></li>
416
+ <li>
417
+ <input type="submit" class="create-button" name="create_field_option" value="<?php _e("Create Field Option", 'custom-contact-forms'); ?>" />
418
+ </li>
419
+ </ul>
420
+ <p id="edit-field-comments"><b>*</b> <?php _e("The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually sent in the email to you. For dropdown fields the option value is optional, for radio fields it is required.", 'custom-contact-forms'); ?></p>
421
+ </form>
422
+ </div>
423
+ </div>
424
+ <a name="manage-forms"></a>
425
+ <h3 class="manage-h3"><?php _e("Manage Forms", 'custom-contact-forms'); ?></h3>
426
+ <table class="widefat post" id="manage-forms" cellspacing="0">
427
+ <thead>
428
+ <tr>
429
+ <th scope="col" class="manage-column form-code"><?php _e("Form Display Code", 'custom-contact-forms'); ?></th>
430
+ <th scope="col" class="manage-column form-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
431
+ <th scope="col" class="manage-column form-title"><?php _e("Title", 'custom-contact-forms'); ?></th>
432
+ <th scope="col" class="manage-column form-submit"><?php _e("Button Text", 'custom-contact-forms'); ?></th>
433
+ <th scope="col" class="manage-column form-submit"><?php _e("Style", 'custom-contact-forms'); ?></th>
434
+ <th scope="col" class="manage-column form-submit"><?php _e("Action", 'custom-contact-forms'); ?></th>
435
+ </tr>
436
+ </thead>
437
+ <tbody>
438
+ <?php
439
+ $forms = parent::selectAllForms();
440
+ for ($i = 0; $i < count($forms); $i++) {
441
+ $form_methods = '<option>Post</option><option>Get</option>';
442
+ $form_methods = str_replace('<option>'.$forms[$i]->form_method.'</option>', '<option selected="selected">'.$forms[$i]->form_method.'</option>', $form_methods);
443
+ $add_fields = $this->getFieldsForm();
444
+ $this_style = parent::selectStyle($forms[$i]->form_style, '');
445
+ $sty_opt = str_replace('<option value="'.$forms[$i]->form_style.'">'.$this_style->style_slug.'</option>', '<option value="'.$forms[$i]->form_style.'" selected="selected">'.$this_style->style_slug.'</option>', $style_options);
446
+ ?>
447
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
448
+ <tr class="<?php if ($i % 2 == 0) echo 'evenrow'; ?>">
449
+ <td><span class="bold">[customcontact form=<?php echo $forms[$i]->id ?>]</span></td>
450
+ <td><input type="text" class="width75" name="form[form_slug]" value="<?php echo $forms[$i]->form_slug; ?>" /></td>
451
+ <td><input type="text" class="width125" name="form[form_title]" value="<?php echo $forms[$i]->form_title; ?>" /></td>
452
+ <td><input class="width100" type="text" name="form[submit_button_text]" value="<?php echo $forms[$i]->submit_button_text; ?>" /></td>
453
+ <td><select name="form[form_style]" class="form_style_input">
454
+ <?php echo $sty_opt; ?>
455
+ </select></td>
456
+ <td><input type="hidden" class="object-id" name="fid" value="<?php echo $forms[$i]->id; ?>" />
457
+ <input type="hidden" class="object-type" name="object_type" value="form" />
458
+ <span class="form-options-expand"></span>
459
+ <input type="submit" name="form_edit" class="edit-button" value="<?php _e("Save", 'custom-contact-forms'); ?>" />
460
+ <input type="submit" name="form_delete" class="delete-button" value="<?php _e("Delete", 'custom-contact-forms'); ?>" />
461
+ </td>
462
+ </tr>
463
+ <tr class="<?php if ($i % 2 == 0) echo 'evenrow'; ?>">
464
+ <td class="form-extra-options textcenter" colspan="8"><table class="form-extra-options-table">
465
+ <tbody>
466
+ <tr>
467
+ <td class="bold"><?php _e("Method", 'custom-contact-forms'); ?></td>
468
+ <td class="bold"><?php _e("Form Action", 'custom-contact-forms'); ?></td>
469
+ <td class="bold"><?php _e("Destination Email", 'custom-contact-forms'); ?></td>
470
+ <td class="bold"><?php _e("Success Message Title", 'custom-contact-forms'); ?></td>
471
+ <td class="bold"><?php _e("Success Message", 'custom-contact-forms'); ?></td>
472
+ <td class="bold"><?php _e("Custom Success URL", 'custom-contact-forms'); ?></td>
473
+ </tr>
474
+ <tr>
475
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("The Form Method is the method by which information is transfer through your form. If you aren't an expert with HTML and PHP, leave this as Post.", 'custom-contact-forms'); ?>">(?)</a>
476
+ <select name="form[form_method]">
477
+ <?php echo $form_methods; ?>
478
+ </select></td>
479
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This lets you process your forms through alternate scripts. If you use a service like InfusionSoft or Aweber, set this to be the same form action as the code provided to you by that service, otherwise leave this blank.", 'custom-contact-forms'); ?>">(?)</a>
480
+ <input class="width100" type="text" name="form[form_action]" value="<?php echo $forms[$i]->form_action; ?>" /></td>
481
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This email address will recieve form emails (provided that Email Form Submissions is set to Yes in general settings).", 'custom-contact-forms'); ?>">(?)</a>
482
+ <input class="width100" type="text" name="form[form_email]" value="<?php echo $forms[$i]->form_email; ?>" /></td>
483
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This will be displayed as the header in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>">(?)</a>
484
+ <input class="width100" type="text" name="form[form_success_title]" value="<?php echo $forms[$i]->form_success_title; ?>" /></td>
485
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("This will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>">(?)</a>
486
+ <input type="text" name="form[form_success_message]" class="width100" value="<?php echo $forms[$i]->form_success_message; ?>" /></td>
487
+ <td><a href="javascript:void(0)" class="toollink" title="<?php _e("If this is filled out, users will be sent to this thank you page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.", 'custom-contact-forms'); ?>">(?)</a>
488
+ <input type="text" class="width100" name="form[form_thank_you_page]" value="<?php echo $forms[$i]->form_thank_you_page; ?>" /></td>
489
+ </tr>
490
+ <tr>
491
+ <td colspan="3"><label for="dettach_object_id"><span><?php _e("Attached Fields:", 'custom-contact-forms'); ?></span></label>
492
+ <?php
493
+ $attached_fields = parent::getAttachedFieldsArray($forms[$i]->id);
494
+ if (empty($attached_fields)) echo '<select name="dettach_object_id"><option value="-1">Nothing Attached!</option></select> ';
495
+ else {
496
+ echo '<select name="dettach_object_id" class="onObject' . $forms[$i]->id . '" objectTypeForm>';
497
+ foreach($attached_fields as $attached_field) {
498
+ $this_field = parent::selectField($attached_field, '');
499
+ echo $this_field->field_slug . ' <option value="'.$this_field->id.'">'.$this_field->field_slug.'</option>';
500
+ }
501
+ echo '</select>';
502
+ }
503
+ ?>
504
+ <input type="submit" class="dettach-button" value="<?php _e("Dettach Field", 'custom-contact-forms'); ?>" name="dettach_field" />
505
+ <br />
506
+ <span class="red bold">*</span> <?php _e("Attach fields in the order you want them displayed.", 'custom-contact-forms'); ?> </td>
507
+ <td colspan="3"><label for="field_id"><span><?php _e("Attach Field:", 'custom-contact-forms'); ?></span></label>
508
+ <select class="onObject<?php echo $forms[$i]->id; ?> objectTypeForm" name="attach_object_id">
509
+ <?php echo $add_fields; ?>
510
+ </select>
511
+ <input class="attach-button" type="submit" name="form_add_field" value="<?php _e("Attach Field", 'custom-contact-forms'); ?>" />
512
+ <br />
513
+ <span class="red bold">*</span> <?php _e("Attach fixed fields or ones you", 'custom-contact-forms'); ?> <a href="#create-fields"><?php _e("create", 'custom-contact-forms'); ?></a>. </td>
514
+ </tr>
515
+ <tr>
516
+ <td colspan="6"><label for="theme_code_<?php echo $forms[$i]->id; ?>"><a href="javascript:void(0)" class="toollink" title="<?php _e("The form display code above ([customcontact form=x]) will only work in Wordpress pages and posts. If you want to display this form in a theme file such as page.php, header.php, index.php, category.php, etc, then insert this PHP snippet.", 'custom-contact-forms'); ?>">(?)</a> <span><?php _e("Code to Display Form in Theme Files:", 'custom-contact-forms'); ?></span></label>
517
+ <input type="text" class="width225" value="&lt;?php if (function_exists('serveCustomContactForm')) { serveCustomContactForm(<?php echo $forms[$i]->id; ?>); } ?&gt;" name="theme_code_<?php echo $forms[$i]->id; ?>" />
518
+ <label for="form[custom_code]"><a href="javascript:void(0)" class="toollink" title="<?php _e("This field allows you to insert HTML directly after the starting <form> tag.", 'custom-contact-forms'); ?>">(?)</a> <?php _e("Custom Code:", 'custom-contact-forms'); ?></label>
519
+ <input name="form[custom_code]" type="text" value="<?php echo $forms[$i]->custom_code; ?>" /></td>
520
+ </tr>
521
+ </tbody>
522
+ </table></td>
523
+ </tr>
524
+ </form>
525
+ <?php
526
+ }
527
+ $remember_check = ($admin_options['remember_field_values'] == 0) ? 'selected="selected"' : '';
528
+ $remember_fields = '<option value="1">'.__('Yes', 'custom-contact-forms').'</option><option '.$remember_check.' value="0">'.__('No', 'custom-contact-forms').'</option>';
529
+ $border_style_options = '<option>solid</option><option>dashed</option>
530
+ <option>grooved</option><option>double</option><option>dotted</option><option>ridged</option><option>none</option>
531
+ <option>inset</option><option>outset</option>';
532
+ ?>
533
+ </tbody>
534
+
535
+ <tfoot>
536
+ <tr>
537
+ <tr>
538
+ <th scope="col" class="manage-column form-code"><?php _e("Form Code", 'custom-contact-forms'); ?></th>
539
+ <th scope="col" class="manage-column form-slug"><?php _e("Slug", 'custom-contact-forms'); ?></th>
540
+ <th scope="col" class="manage-column form-title"><?php _e("Title", 'custom-contact-forms'); ?></th>
541
+ <th scope="col" class="manage-column form-submit"><?php _e("Button Text", 'custom-contact-forms'); ?></th>
542
+ <th scope="col" class="manage-column form-submit"><?php _e("Style", 'custom-contact-forms'); ?></th>
543
+ <th scope="col" class="manage-column form-submit"><?php _e("Action", 'custom-contact-forms'); ?></th>
544
+ </tr>
545
+ </tr>
546
+
547
+ </tfoot>
548
+ </table>
549
+ <?php
550
+ require_once('custom-contact-forms-user-data.php');
551
+ $user_data_array = parent::selectAllUserData();
552
+ ?>
553
+ <a name="form-submissions"></a>
554
+ <h3 class="manage-h3"><?php _e("Saved Form Submissions", 'custom-contact-forms'); ?></h3>
555
+ <table class="widefat post" id="form-submissions" cellspacing="0">
556
+ <thead>
557
+ <tr>
558
+ <th scope="col" class="manage-column width250"><?php _e("Date Submitted", 'custom-contact-forms'); ?></th>
559
+ <th scope="col" class="manage-column width150"><?php _e("Form Submitted", 'custom-contact-forms'); ?></th>
560
+ <th scope="col" class="manage-column width250"><?php _e("Form Page", 'custom-contact-forms'); ?></th>
561
+ <th scope="col" class="manage-column "><div class="alignright"><?php _e("Action", 'custom-contact-forms'); ?></div></th>
562
+ </tr>
563
+ </thead>
564
+ <tbody>
565
+ <?php
566
+ $i = 0;
567
+ foreach ($user_data_array as $data_object) {
568
+ $data = new CustomContactFormsUserData(array('form_id' => $data_object->data_formid, 'data_time' => $data_object->data_time, 'form_page' => $data_object->data_formpage, 'encoded_data' => $data_object->data_value));
569
+ ?>
570
+ <tr class="submission-top <?php if ($i % 2 == 0) echo 'evenrow'; ?>">
571
+ <td><?php echo date('F d, Y h:i:s A', $data->getDataTime()); ?></td>
572
+ <td><?php
573
+ if ($data->getFormID() > 0) {
574
+ $data_form = parent::selectForm($data->getFormID());
575
+ echo $data_form->form_slug;
576
+ } else
577
+ _e('Custom HTML Form', 'custom-contact-forms');
578
+ ?>
579
+ </td>
580
+ <td><?php echo $data->getFormPage(); ?> </td>
581
+ <td class="alignright"><form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
582
+ <span class="submission-content-expand"></span>
583
+ <input type="submit" class="delete-button" value="<?php _e("Delete", 'custom-contact-forms'); ?>" name="form_submission_delete" />
584
+ <input type="hidden" class="object-type" name="object_type" value="form_submission" />
585
+ <input type="hidden" class="object-id" value="<?php echo $data_object->id; ?>" name="uid" />
586
+ </form></td>
587
+ </tr>
588
+ <tr class="submission-content <?php if ($i % 2 == 0) echo 'evenrow'; ?>">
589
+ <td colspan="4"><ul>
590
+ <?php
591
+ $data_array = $data->getDataArray();
592
+ foreach ($data_array as $item_key => $item_value) {
593
+ ?>
594
+ <li>
595
+ <div><?php echo $item_key; ?></div>
596
+ <p><?php echo $item_value; ?></p>
597
+ </li>
598
+ <?php
599
+ }
600
+ ?>
601
+ </ul></td>
602
+ </tr>
603
+ <?php
604
+ $i++;
605
+ }
606
+ ?>
607
+ </tbody>
608
+ <tfoot>
609
+ <tr>
610
+ <th scope="col" class="manage-column width250"><?php _e("Date Submitted", 'custom-contact-forms'); ?></th>
611
+ <th scope="col" class="manage-column width150"><?php _e("Form Submitted", 'custom-contact-forms'); ?></th>
612
+ <th scope="col" class="manage-column width250"><?php _e("Form Page", 'custom-contact-forms'); ?></th>
613
+ <th scope="col" class="manage-column "><div class="alignright"><?php _e("Action", 'custom-contact-forms'); ?></div></th>
614
+ </tr>
615
+ </tfoot>
616
+ </table>
617
+ <a name="general-settings"></a>
618
+ <div id="general-settings" class="postbox">
619
+ <h3 class="hndle"><span><?php _e("General Settings", 'custom-contact-forms'); ?></span></h3>
620
+ <div class="inside">
621
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
622
+ <ul>
623
+ <li>
624
+ <label for="email_form_submissions"><?php _e("Email Form Submissions:", 'custom-contact-forms'); ?></label>
625
+ <select name="email_form_submissions">
626
+ <option value="1"><?php _e("Yes", 'custom-contact-forms'); ?></option>
627
+ <option value="0" <?php if ($admin_options['email_form_submissions'] == 0) echo 'selected="selected"'; ?>><?php _e("No", 'custom-contact-forms'); ?></option>
628
+ </select>
629
+ </li>
630
+ <li class="descrip"><?php _e("When a user fills out one of your forms, the info he submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info.", 'custom-contact-forms'); ?></li>
631
+ <li>
632
+ <label for="default_to_email"><?php _e("Default Email:", 'custom-contact-forms'); ?></label>
633
+ <input name="default_to_email" value="<?php echo $admin_options['default_to_email']; ?>" type="text" maxlength="100" />
634
+ </li>
635
+ <li class="descrip"><?php _e("Form emails will be sent <span>to</span> this address, if no destination email is specified by the form.", 'custom-contact-forms'); ?></li>
636
+ <li>
637
+ <label for="enable_jquery"><?php _e("Front End JQuery:", 'custom-contact-forms'); ?></label>
638
+ <select name="enable_jquery">
639
+ <option value="1"><?php _e("Enabled", 'custom-contact-forms'); ?></option>
640
+ <option <?php if ($admin_options['enable_jquery'] != 1) echo 'selected="selected"'; ?> value="0"><?php _e("Disabled", 'custom-contact-forms'); ?></option>
641
+ </select>
642
+ </li>
643
+ <li class="descrip"><?php _e("Some plugins don't setup JQuery correctly, so when any other plugin uses JQuery (whether correctly or not), JQuery works for neither plugin. This plugin uses JQuery correctly. If another plugin isn't using JQuery correctly but is more important to you than this one: disable this option. 99% of this plugin's functionality will work without JQuery, just no field instruction tooltips.", 'custom-contact-forms'); ?></li>
644
+ <li>
645
+ <label for="default_from_email"><?php _e("Default From Email:", 'custom-contact-forms'); ?></label>
646
+ <input name="default_from_email" value="<?php echo $admin_options['default_from_email']; ?>" type="text" maxlength="100" />
647
+ </li>
648
+ <li class="descrip"><?php _e("Form emails will be sent <span>from</span> this address. It is recommended you provide a real email address that has been created through your host.", 'custom-contact-forms'); ?></li>
649
+ <li>
650
+ <label for="default_form_subject"><?php _e("Default Email Subject:", 'custom-contact-forms'); ?></label>
651
+ <input name="default_form_subject" value="<?php echo $admin_options['default_form_subject']; ?>" type="text" />
652
+ </li>
653
+ <li class="descrip"><?php _e("Default subject to be included in all form emails.", 'custom-contact-forms'); ?></li>
654
+ <li>
655
+ <label for="form_success_message_title"><?php _e("Default Form Success Message Title:", 'custom-contact-forms'); ?></label>
656
+ <input name="form_success_message_title" value="<?php echo $admin_options['form_success_message_title']; ?>" type="text"/>
657
+ </li>
658
+ <li class="descrip"><?php _e("If someone fills out a form for which a success message title is not provided and a custom success page is not provided, the plugin will show a popover using this field as the window title.", 'custom-contact-forms'); ?></li>
659
+ <li>
660
+ <label for="form_success_message"><?php _e("Default Form Success Message:", 'custom-contact-forms'); ?></label>
661
+ <input name="form_success_message" value="<?php echo $admin_options['form_success_message']; ?>" type="text"/>
662
+ </li>
663
+ <li class="descrip"><?php _e("If someone fills out a form for which a success message is not provided and a custom success page is not provided, the plugin will show a popover containing this message.", 'custom-contact-forms'); ?></li>
664
+ <li>
665
+ <label for="remember_field_values"><?php _e("Remember Field Values:", 'custom-contact-forms'); ?></label>
666
+ <select name="remember_field_values">
667
+ <option value="1"><?php _e("Yes", 'custom-contact-forms'); ?></option>
668
+ <option <?php if ($admin_options['remember_field_values'] == 0) echo 'selected="selected"'; ?> value="0"><?php _e("No", 'custom-contact-forms'); ?></option>
669
+ </select>
670
+ </li>
671
+ <li class="descrip"><?php _e("Selecting yes will make form fields remember how they were last filled out.", 'custom-contact-forms'); ?></li>
672
+ <li>
673
+ <label for="enable_widget_tooltips"><?php _e("Tooltips in Widget:", 'custom-contact-forms'); ?></label>
674
+ <select name="enable_widget_tooltips">
675
+ <option value="1"><?php _e("Enabled", 'custom-contact-forms'); ?></option>
676
+ <option <?php if ($admin_options['enable_widget_tooltips'] == 0) echo 'selected="selected"'; ?> value="0"><?php _e("Disabled", 'custom-contact-forms'); ?></option>
677
+ </select>
678
+ </li>
679
+ <li class="descrip"><?php _e("Enabling this shows tooltips containing field instructions on forms in the widget.", 'custom-contact-forms'); ?></li>
680
+ <li>
681
+ <label for="author_link"><?php _e("Hide Plugin Author Link in Code:", 'custom-contact-forms'); ?></label>
682
+ <select name="author_link">
683
+ <option value="1"><?php _e("Yes", 'custom-contact-forms'); ?></option>
684
+ <option <?php if ($admin_options['author_link'] == 0) echo 'selected="selected"'; ?> value="0"><?php _e("No", 'custom-contact-forms'); ?></option>
685
+ </select>
686
+ </li>
687
+ <li>
688
+ <label for="code_type"><?php _e("Use Code Type:", 'custom-contact-forms'); ?></label>
689
+ <select name="code_type">
690
+ <option>XHTML</option>
691
+ <option <?php if ($admin_options['code_type'] == 'HTML') echo 'selected="selected"'; ?>>HTML</option>
692
+ </select>
693
+ </li>
694
+ <li class="descrip"><?php _e("This lets you switch the form code between HTML and XHTML.", 'custom-contact-forms'); ?></li>
695
+ <li>
696
+ <label for="admin_ajax"><?php _e("Fancy Admin AJAX Abilities:", 'custom-contact-forms'); ?></label>
697
+ <select name="admin_ajax">
698
+ <option value="1"><?php _e("Enabled", 'custom-contact-forms'); ?></option>
699
+ <option <?php if ($admin_options['admin_ajax'] == 0) echo 'selected="selected"'; ?>><?php _e("Disabled", 'custom-contact-forms'); ?></option>
700
+ </select>
701
+ </li>
702
+ <li class="descrip"><?php _e("If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below.", 'custom-contact-forms'); ?></li>
703
+ <li>
704
+ <label for="wp_mail_function"><?php _e("Use Wordpress Mail Function:", 'custom-contact-forms'); ?></label>
705
+ <select name="wp_mail_function">
706
+ <option value="1"><?php _e("Yes", 'custom-contact-forms'); ?></option>
707
+ <option <?php if ($admin_options['wp_mail_function'] == 0) echo 'selected="selected"'; ?> value="0"><?php _e("No", 'custom-contact-forms'); ?></option>
708
+ </select>
709
+ </li>
710
+ <li class="descrip"><?php _e("Setting this to no will use the PHP mail function. If your forms aren't sending mail properly try setting this to no.", 'custom-contact-forms'); ?></li>
711
+ <li class="show-widget"><b><?php _e("Show Sidebar Widget:", 'custom-contact-forms'); ?></b></li>
712
+ <li>
713
+ <label>
714
+ <input value="1" type="checkbox" name="show_widget_home" <?php if ($admin_options['show_widget_home'] == 1) echo 'checked="checked"'; ?> />
715
+ <?php _e("On Homepage", 'custom-contact-forms'); ?></label>
716
+ <label>
717
+ <input value="1" type="checkbox" name="show_widget_pages" <?php if ($admin_options['show_widget_pages'] == 1) echo 'checked="checked"'; ?> />
718
+ <?php _e("On Pages", 'custom-contact-forms'); ?></label>
719
+ <label>
720
+ <input value="1" type="checkbox" name="show_widget_singles" <?php if ($admin_options['show_widget_singles'] == 1) echo 'checked="checked"'; ?> />
721
+ <?php _e("On Single Posts", 'custom-contact-forms'); ?></label>
722
+ <br />
723
+ <label>
724
+ <input value="1" type="checkbox" name="show_widget_categories" <?php if ($admin_options['show_widget_categories'] == 1) echo 'checked="checked"'; ?> />
725
+ <?php _e("On Categories", 'custom-contact-forms'); ?></label>
726
+ <label>
727
+ <input value="1" type="checkbox" name="show_widget_archives" <?php if ($admin_options['show_widget_archives'] == 1) echo 'checked="checked"'; ?> />
728
+ <?php _e("On Archives", 'custom-contact-forms'); ?></label>
729
+ </li>
730
+ <li>
731
+ <input type="submit" value="<?php _e("Update", 'custom-contact-forms'); ?>" name="general_settings" />
732
+ </li>
733
+ </ul>
734
+ </form>
735
+ </div>
736
+ </div>
737
+ <a name="instructions"></a>
738
+ <div id="instructions" class="postbox">
739
+ <h3 class="hndle"><span><?php _e("Instructions", 'custom-contact-forms'); ?></span></h3>
740
+ <div class="inside">
741
+ <p><b><?php _e("The default content will help you get a better feel of ways this plugin can be used and is the best way to learn.", 'custom-contact-forms'); ?></b></p>
742
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
743
+ <div class="ccf-center">
744
+ <input type="submit" value="<?php _e("Insert Default Content", 'custom-contact-forms'); ?>" name="insert_default_content" />
745
+ </div>
746
+ </form>
747
+ <p><?php _e("1. Create a form.", 'custom-contact-forms'); ?></p>
748
+ <p><?php _e("2. Create fields and attach those fields to the forms of your choice.", 'custom-contact-forms'); ?> <span class="red bold">*</span> <?php _e("Attach the fields in the order that you want them to show up in the form. If you mess up you can detach and reattach them. Create field options in the field option manager; field options should be attached to radio and dropdown fields.", 'custom-contact-forms'); ?></p>
749
+ <p><?php _e("3. Display those forms in posts and pages by inserting the code: [customcontact form=<b>FORMID</b>]. Replace <b>FORMID</b> with the id listed to the left of the form slug next to the form of your choice above. You can also display forms in theme files; the code for this is provided within each forms admin section.", 'custom-contact-forms'); ?></p>
750
+ <p><?php _e("4. Prevent spam by attaching the fixed field, captcha or ishuman. Captcha requires users to type in a number shown on an image. Ishuman requires users to check a box to prove they aren't a spam bot.", 'custom-contact-forms'); ?></p>
751
+ <p><?php _e("5. Add a form to your sidebar, by dragging the Custom Contact Form widget in to your sidebar.", 'custom-contact-forms'); ?></p>
752
+ <p><?php _e("6. Configure the General Settings appropriately; this is important if you want to receive your web form messages!", 'custom-contact-forms'); ?></p>
753
+ <p><?php _e("7. Create form styles to change your forms appearances. The image below explains how each style field can change the look of your forms.", 'custom-contact-forms'); ?></p>
754
+ <p><?php _e("8. (advanced) If you are confident in your HTML and CSS skills, you can use the", 'custom-contact-forms'); ?> <a href="#custom-html"><?php _e("Custom HTML Forms feature", 'custom-contact-forms'); ?></a> <?php _e("as a framework and write your forms from scratch. This allows you to use this plugin simply to process your form requests. The Custom HTML Forms feature will process and email any form variables sent to it regardless of whether they are created in the fields manager.", 'custom-contact-forms'); ?></p>
755
+ <p><span class="red bold">*</span> <?php _e("These instructions briefly tell you in which order you should use forms, fields, field options, and styles.", 'custom-contact-forms'); ?> <b><?php _e("If you want to read in detail about using forms, fields, field options, styles and the rest of this plugin, click the button below.", 'custom-contact-forms'); ?></b></p>
756
+ <div class="ccf-center">
757
+ <input type="button" class="usage-popover-button" value="<?php _e("View Plugin Usage Popover", 'custom-contact-forms'); ?>" />
758
+ </div>
759
+ <div class="ccf-style-example"></div>
760
+ <div class="ccf-success-popover-example"></div>
761
+ </div>
762
+ </div>
763
+ <a name="create-styles"></a>
764
+ <div id="create-styles" class="postbox">
765
+ <h3 class="hndle"><span><?php _e("Create A Style for Your Forms", 'custom-contact-forms'); ?></span></h3>
766
+ <div class="inside">
767
+ <p><?php _e("Use this manager to create styles for your forms. Each field is already filled out with nice look defaults. It is recommended you simply input a slug and click create to see the defaults before you start changing values.", 'custom-contact-forms'); ?></p>
768
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
769
+ <ul class="style_left">
770
+ <li>
771
+ <label for="style_slug">* <?php _e("Style Slug:", 'custom-contact-forms'); ?></label>
772
+ <input type="text" maxlength="30" class="width75" name="style[style_slug]" />
773
+ <?php _e("(Must be unique)", 'custom-contact-forms'); ?></li>
774
+ <li>
775
+ <label for="title_fontsize"><?php _e("Title Font Size:", 'custom-contact-forms'); ?></label>
776
+ <input type="text" maxlength="20" value="1.2em" class="width75" name="style[title_fontsize]" />
777
+ <?php _e("(ex: 10pt, 10px, 1em)", 'custom-contact-forms'); ?></li>
778
+ <li>
779
+ <label for="title_fontcolor"><?php _e("Title Font Color:", 'custom-contact-forms'); ?></label>
780
+ <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[title_fontcolor]" />
781
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?></li>
782
+ <li>
783
+ <label for="label_width"><?php _e("Label Width:", 'custom-contact-forms'); ?></label>
784
+ <input type="text" maxlength="20" value="200px" class="width75" name="style[label_width]" />
785
+ <?php _e("(ex: 100px or 20%)", 'custom-contact-forms'); ?></li>
786
+ <li>
787
+ <label for="label_fontsize"><?php _e("Label Font Size:", 'custom-contact-forms'); ?></label>
788
+ <input type="text" maxlength="20" value="1em" class="width75" name="style[label_fontsize]" />
789
+ <?php _e("(ex: 10px, 10pt, 1em)", 'custom-contact-forms'); ?></li>
790
+ <li>
791
+ <label for="label_fontcolor"><?php _e("Label Font Color:", 'custom-contact-forms'); ?></label>
792
+ <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[label_fontcolor]" />
793
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?></li>
794
+ <li>
795
+ <label for="input_width"><?php _e("Text Field Width:", 'custom-contact-forms'); ?></label>
796
+ <input type="text" maxlength="20" value="200px" class="width75" name="style[input_width]" />
797
+ <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?></li>
798
+ <li>
799
+ <label for="textarea_width"><?php _e("Textarea Field Width:", 'custom-contact-forms'); ?></label>
800
+ <input type="text" maxlength="20" value="200px" class="width75" name="style[textarea_width]" />
801
+ <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?></li>
802
+ <li>
803
+ <label for="textarea_height"><?php _e("Textarea Field Height:", 'custom-contact-forms'); ?></label>
804
+ <input type="text" maxlength="20" value="90px" class="width75" name="style[textarea_height]" />
805
+ <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?></li>
806
+ <li>
807
+ <label for="field_fontsize"><?php _e("Field Font Size:", 'custom-contact-forms'); ?></label>
808
+ <input type="text" maxlength="20" value="1.3em" class="width75" name="style[field_fontsize]" />
809
+ <?php _e("(ex: 10px, 10pt, 1em", 'custom-contact-forms'); ?></li>
810
+ <li>
811
+ <label for="field_fontcolor"><?php _e("Field Font Color:", 'custom-contact-forms'); ?></label>
812
+ <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[field_fontcolor]" />
813
+ <?php _e("(ex: 333333)", 'custom-contact-forms'); ?></li>
814
+ <li>
815
+ <label for="field_borderstyle"><?php _e("Field Border Style:", 'custom-contact-forms'); ?></label>
816
+ <select class="width75" name="style[field_borderstyle]">
817
+ <?php echo str_replace('<option>solid</option>', '<option selected="selected">solid</option>', $border_style_options); ?>
818
+ </select>
819
+ </li>
820
+ <li>
821
+ <label for="form_margin"><?php _e("Form Margin:", 'custom-contact-forms'); ?></label>
822
+ <input type="text" maxlength="20" value="7px" class="width75" name="style[form_margin]" />
823
+ <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?></li>
824
+ <li>
825
+ <label for="label_margin"><?php _e("Label Margin:", 'custom-contact-forms'); ?></label>
826
+ <input type="text" maxlength="20" value="5px" class="width75" name="style[label_margin]" />
827
+ <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?></li>
828
+ <li>
829
+ <label for="textarea_backgroundcolor"><?php _e("Textarea Background Color:", 'custom-contact-forms'); ?></label>
830
+ <input type="text" maxlength="20" value="f5f5f5" class="width75 colorfield" name="style[textarea_backgroundcolor]" />
831
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?></li>
832
+ <li>
833
+ <label for="success_popover_fontcolor"><?php _e("Success Popover Font Color:", 'custom-contact-forms'); ?></label>
834
+ <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[success_popover_fontcolor]" />
835
+ <?php _e("(ex: 333333)", 'custom-contact-forms'); ?></li>
836
+ <li>
837
+ <label for="success_popover_title_fontsize"><?php _e("Success Popover Title Font Size:", 'custom-contact-forms'); ?></label>
838
+ <input type="text" maxlength="20" value="15px" class="width75" name="style[success_popover_title_fontsize]" />
839
+ <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?></li>
840
+ <li>
841
+ <label for="form_backgroundcolor"><?php _e("Form Background Color:", 'custom-contact-forms'); ?></label>
842
+ <input type="text" maxlength="20" value="ffffff" class="width75 colorfield" name="style[form_backgroundcolor]" />
843
+ <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?></li>
844
+ <li>
845
+ <label for="tooltip_backgroundcolor"><?php _e("Tooltip Background Color:", 'custom-contact-forms'); ?></label>
846
+ <input type="text" maxlength="20" value="000000" class="width75 colorfield" name="style[tooltip_backgroundcolor]" />
847
+ <?php _e("(ex: 000000 or black)", 'custom-contact-forms'); ?></li>
848
+ </ul>
849
+ <ul class="style_right">
850
+ <li>
851
+ <label for="input_width"><?php _e("Field Border Color:", 'custom-contact-forms'); ?></label>
852
+ <input type="text" maxlength="20" value="999999" class="width75 colorfield" name="style[field_bordercolor]" />
853
+ <?php _e("(ex: 100px or 100%)", 'custom-contact-forms'); ?></li>
854
+ <li>
855
+ <label for="form_borderstyle"><?php _e("Form Border Style:", 'custom-contact-forms'); ?></label>
856
+ <select class="width75" name="style[form_borderstyle]">
857
+ <?php echo $border_style_options; ?>
858
+ </select>
859
+ </li>
860
+ <li>
861
+ <label for="form_bordercolor"><?php _e("Form Border Color:", 'custom-contact-forms'); ?></label>
862
+ <input type="text" maxlength="20" value="ffffff" class="width75 colorfield" name="style[form_bordercolor]" />
863
+ <?php _e("(ex: 000000)", 'custom-contact-forms'); ?></li>
864
+ <li>
865
+ <label for="form_borderwidth"><?php _e("Form Border Width:", 'custom-contact-forms'); ?></label>
866
+ <input type="text" maxlength="20" value="0px" class="width75" name="style[form_borderwidth]" />
867
+ <?php _e("(ex: 1px)", 'custom-contact-forms'); ?></li>
868
+ <li>
869
+ <label for="form_borderwidth"><?php _e("Form Width:", 'custom-contact-forms'); ?></label>
870
+ <input type="text" maxlength="20" value="100%" class="width75" name="style[form_width]" />
871
+ <?php _e("(ex: 100px or 50%)", 'custom-contact-forms'); ?></li>
872
+ <li>
873
+ <label for="form_borderwidth"><?php _e("Form Font Family:", 'custom-contact-forms'); ?></label>
874
+ <input type="text" maxlength="120" value="Verdana, tahoma, arial" class="width75" name="style[form_fontfamily]" />
875
+ <?php _e("(ex: Verdana, Tahoma, Arial)", 'custom-contact-forms'); ?></li>
876
+ <li>
877
+ <label for="submit_width"><?php _e("Button Width:", 'custom-contact-forms'); ?></label>
878
+ <input type="text" maxlength="20" value="auto" class="width75" name="style[submit_width]" />
879
+ <?php _e("(ex: 100px, 30%, auto)", 'custom-contact-forms'); ?></li>
880
+ <li>
881
+ <label for="submit_height"><?php _e("Button Height:", 'custom-contact-forms'); ?></label>
882
+ <input type="text" maxlength="20" value="30px" class="width75" name="style[submit_height]" />
883
+ <?php _e("(ex: 100px or 30%)", 'custom-contact-forms'); ?></li>
884
+ <li>
885
+ <label for="submit_fontsize"><?php _e("Button Font Size:", 'custom-contact-forms'); ?></label>
886
+ <input type="text" maxlength="20" value="1.1em" class="width75" name="style[submit_fontsize]" />
887
+ <?php _e("(ex: 10px, 10pt, 1em)", 'custom-contact-forms'); ?></li>
888
+ <li>
889
+ <label for="submit_fontcolor"><?php _e("Button Font Color:", 'custom-contact-forms'); ?></label>
890
+ <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[submit_fontcolor]" />
891
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?></li>
892
+ <li>
893
+ <label for="field_backgroundcolor"><?php _e("Field Background Color:", 'custom-contact-forms'); ?></label>
894
+ <input type="text" maxlength="20" value="f5f5f5" class="width75 colorfield" name="style[field_backgroundcolor]" />
895
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?></li>
896
+ <li>
897
+ <label for="form_padding"><?php _e("Form Padding:", 'custom-contact-forms'); ?></label>
898
+ <input type="text" maxlength="20" value="8px" class="width75" name="style[form_padding]" />
899
+ <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?></li>
900
+ <li>
901
+ <label for="title_margin"><?php _e("Title Margin:", 'custom-contact-forms'); ?></label>
902
+ <input type="text" maxlength="20" value="5px" class="width75" name="style[title_margin]" />
903
+ <?php _e("(ex: 5px or 1em)", 'custom-contact-forms'); ?></li>
904
+ <li>
905
+ <label for="title_margin"><?php _e("Dropdown Width:", 'custom-contact-forms'); ?></label>
906
+ <input type="text" maxlength="20" value="auto" class="width75" name="style[dropdown_width]" />
907
+ <?php _e("(ex: 30px, 20%, or auto)", 'custom-contact-forms'); ?></li>
908
+ <li>
909
+ <label for="success_popover_bordercolor"><?php _e("Success Popover Border Color:", 'custom-contact-forms'); ?></label>
910
+ <input type="text" maxlength="20" value="efefef" class="width75 colorfield" name="style[success_popover_bordercolor]" />
911
+ <?php _e("(ex: FF0000)", 'custom-contact-forms'); ?></li>
912
+ <li>
913
+ <label for="success_popover_fontsize"><?php _e("Success Popover Font Size:", 'custom-contact-forms'); ?></label>
914
+ <input type="text" maxlength="20" value="12px" class="width75" name="style[success_popover_fontsize]" />
915
+ <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?></li>
916
+ <li>
917
+ <label for="success_popover_height"><?php _e("Success Popover Height:", 'custom-contact-forms'); ?></label>
918
+ <input type="text" maxlength="20" value="200px" class="width75" name="style[success_popover_height]" />
919
+ <?php _e("(ex: 200px, 6em, 50%)", 'custom-contact-forms'); ?></li>
920
+ <li>
921
+ <label for="field_borderround"><?php _e("Field Border Roundness:", 'custom-contact-forms'); ?></label>
922
+ <input type="text" maxlength="20" value="6px" class="width75" name="style[field_borderround]" />
923
+ <?php _e("(ex: 6px, or 0px)", 'custom-contact-forms'); ?></li>
924
+ <li>
925
+ <label for="tooltip_fontsize"><?php _e("Tooltip", 'custom-contact-forms'); ?> <a href="javascript:void(0)" class="toollink" title="<?php _e("A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field.", 'custom-contact-forms'); ?>">(?)</a> <?php _e("Font Size:", 'custom-contact-forms'); ?></label>
926
+ <input type="text" maxlength="20" value="12px" class="width75" name="style[tooltip_fontsize]" />
927
+ <?php _e("(ex: 12px, 1em, 100%)", 'custom-contact-forms'); ?></li>
928
+ <li>
929
+ <label for="tooltip_fontcolor"><?php _e("Tooltip Font Color:", 'custom-contact-forms'); ?></label>
930
+ <input type="text" maxlength="20" value="ffffff" class="width75 colorfield" name="style[tooltip_fontcolor]" />
931
+ <?php _e("(ex: ffffff or white)", 'custom-contact-forms'); ?></li>
932
+ <li>
933
+ <input type="submit" value="<?php _e("Create Style", 'custom-contact-forms'); ?>" name="style_create" />
934
+ </li>
935
+ </ul>
936
+ </form>
937
+ </div>
938
+ </div>
939
+ <a name="manage-styles"></a>
940
+ <h3 class="manage-h3"><?php _e("Manage Form Styles", 'custom-contact-forms'); ?></h3>
941
+ <table class="widefat post" id="manage-styles" cellspacing="0">
942
+ <thead>
943
+ <tr>
944
+ <th scope="col" class="manage-column"></th>
945
+ <th scope="col" class="manage-column"></th>
946
+ <th scope="col" class="manage-column"></th>
947
+ <th scope="col" class="manage-column"></th>
948
+ <th scope="col" class="manage-column"></th>
949
+ <th scope="col" class="manage-column"></th>
950
+ </tr>
951
+ </thead>
952
+ <tbody>
953
+ <?php
954
+ $styles = parent::selectAllStyles();
955
+ $i = 0;
956
+ foreach ($styles as $style) {
957
+ ?>
958
+ <tr class="<?php if ($i % 2 == 0) echo 'evenrow'; ?>">
959
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
960
+ <td><label>* <?php _e("Slug:", 'custom-contact-forms'); ?></label>
961
+ <input type="text" maxlength="30" value="<?php echo $style->style_slug; ?>" name="style[style_slug]" />
962
+ <br />
963
+ <label><?php _e("Font Family:", 'custom-contact-forms'); ?></label>
964
+ <input type="text" maxlength="120" value="<?php echo $style->form_fontfamily; ?>" name="style[form_fontfamily]" />
965
+ <br />
966
+ <label><?php _e("Textarea Background", 'custom-contact-forms'); ?><br />
967
+ <?php _e("Color:", 'custom-contact-forms'); ?></label>
968
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->textarea_backgroundcolor; ?>" name="style[textarea_backgroundcolor]" />
969
+ <br />
970
+ <label><?php _e("Success Popover", 'custom-contact-forms'); ?><br />
971
+ <?php _e("Border Color:", 'custom-contact-forms'); ?></label>
972
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_bordercolor; ?>" name="style[success_popover_bordercolor]" />
973
+ <br />
974
+ <label><?php _e("Tooltip", 'custom-contact-forms'); ?> <a href="javascript:void(0)" class="toollink" title="<?php _e("A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field.", 'custom-contact-forms'); ?>">(?)</a> <?php _e("Font Color:", 'custom-contact-forms'); ?></label>
975
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->tooltip_fontcolor; ?>" name="style[tooltip_fontcolor]" />
976
+ <br />
977
+ <input type="submit" class="submit-styles edit-button" name="style_edit" value="<?php _e("Save", 'custom-contact-forms'); ?>" />
978
+ <br />
979
+ <input type="submit" class="submit-styles delete-button" name="style_delete" value="<?php _e("Delete Style", 'custom-contact-forms'); ?>" />
980
+ </td>
981
+ <td><label><?php _e("Form Width:", 'custom-contact-forms'); ?></label>
982
+ <input type="text" maxlength="20" value="<?php echo $style->form_width; ?>" name="style[form_width]" />
983
+ <br />
984
+ <label><?php _e("Text Field Width:", 'custom-contact-forms'); ?></label>
985
+ <input type="text" maxlength="20" value="<?php echo $style->input_width; ?>" name="style[input_width]" />
986
+ <br />
987
+ <label><?php _e("Textarea Width:", 'custom-contact-forms'); ?></label>
988
+ <input type="text" maxlength="20" value="<?php echo $style->textarea_width; ?>" name="style[textarea_width]" />
989
+ <br />
990
+ <label><?php _e("Textarea Height:", 'custom-contact-forms'); ?></label>
991
+ <input type="text" maxlength="20" value="<?php echo $style->textarea_height; ?>" name="style[textarea_height]" />
992
+ <br />
993
+ <label><?php _e("Dropdown Width:", 'custom-contact-forms'); ?></label>
994
+ <input type="text" maxlength="20" value="<?php echo $style->dropdown_width; ?>" name="style[dropdown_width]" />
995
+ <br />
996
+ <label><?php _e("Label Margin:", 'custom-contact-forms'); ?></label>
997
+ <input type="text" maxlength="20" value="<?php echo $style->label_margin; ?>" name="style[label_margin]" />
998
+ <br />
999
+ <label><?php _e("Success Popover", 'custom-contact-forms'); ?><br />
1000
+ <?php _e("Height:", 'custom-contact-forms'); ?></label>
1001
+ <input type="text" maxlength="20" value="<?php echo $style->success_popover_height; ?>" name="style[success_popover_height]" />
1002
+ <br />
1003
+ </td>
1004
+ <td><label><?php _e("Label Width:", 'custom-contact-forms'); ?></label>
1005
+ <input type="text" maxlength="20" value="<?php echo $style->label_width; ?>" name="style[label_width]" />
1006
+ <br />
1007
+ <label><?php _e("Button Width:", 'custom-contact-forms'); ?></label>
1008
+ <input type="text" maxlength="20" value="<?php echo $style->submit_width; ?>" name="style[submit_width]" />
1009
+ <br />
1010
+ <label><?php _e("Button Height:", 'custom-contact-forms'); ?></label>
1011
+ <input type="text" maxlength="20" value="<?php echo $style->submit_height; ?>" name="style[submit_height]" />
1012
+ <br />
1013
+ <label><?php _e("Field Background Color:", 'custom-contact-forms'); ?></label>
1014
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_backgroundcolor; ?>" name="style[field_backgroundcolor]" />
1015
+ <br />
1016
+ <label><?php _e("Title Margin:", 'custom-contact-forms'); ?></label>
1017
+ <input type="text" maxlength="20" value="<?php echo $style->title_margin; ?>" name="style[title_margin]" />
1018
+ <br />
1019
+ <label><?php _e("Success Popover", 'custom-contact-forms'); ?><br />
1020
+ <?php _e("Title Font Size:", 'custom-contact-forms'); ?></label>
1021
+ <input type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontsize; ?>" name="style[success_popover_title_fontsize]" />
1022
+ <label><?php _e("Form Background Color:", 'custom-contact-forms'); ?></label>
1023
+ <input type="text" class="colorfield" maxlength="20" value="<?php echo $style->form_backgroundcolor; ?>" name="style[form_backgroundcolor]" />
1024
+ </td>
1025
+ <td><label><?php _e("Title Font Size:", 'custom-contact-forms'); ?></label>
1026
+ <input type="text" maxlength="20" value="<?php echo $style->title_fontsize; ?>" name="style[title_fontsize]" />
1027
+ <br />
1028
+ <label><?php _e("Label Font Size:", 'custom-contact-forms'); ?></label>
1029
+ <input type="text" maxlength="20" value="<?php echo $style->label_fontsize; ?>" name="style[label_fontsize]" />
1030
+ <br />
1031
+ <label><?php _e("Field Font Size:", 'custom-contact-forms'); ?></label>
1032
+ <input type="text" maxlength="20" value="<?php echo $style->field_fontsize; ?>" name="style[field_fontsize]" />
1033
+ <br />
1034
+ <label><?php _e("Button Font Size:", 'custom-contact-forms'); ?></label>
1035
+ <input type="text" maxlength="20" value="<?php echo $style->submit_fontsize; ?>" name="style[submit_fontsize]" />
1036
+ <br />
1037
+ <label><?php _e("Form Padding:", 'custom-contact-forms'); ?></label>
1038
+ <input type="text" maxlength="20" value="<?php echo $style->form_padding; ?>" name="style[form_padding]" />
1039
+ <br />
1040
+ <label><?php _e("Success Popover", 'custom-contact-forms'); ?><br />
1041
+ <?php _e("Font Size:", 'custom-contact-forms'); ?></label>
1042
+ <input type="text" maxlength="20" value="<?php echo $style->success_popover_fontsize; ?>" name="style[success_popover_fontsize]" />
1043
+ <br />
1044
+ <label><?php _e("Tooltip", 'custom-contact-forms'); ?> <a href="javascript:void(0)" class="toollink" title="<?php _e("A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field.", 'custom-contact-forms'); ?>">(?)</a> <?php _e("Background Color:", 'custom-contact-forms'); ?></label>
1045
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->tooltip_backgroundcolor; ?>" name="style[tooltip_backgroundcolor]" />
1046
+ </td>
1047
+ <td><label><?php _e("Title Font Color:", 'custom-contact-forms'); ?></label>
1048
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->title_fontcolor; ?>" name="style[title_fontcolor]" />
1049
+ <br />
1050
+ <label><?php _e("Label Font Color:", 'custom-contact-forms'); ?></label>
1051
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->label_fontcolor; ?>" name="style[label_fontcolor]" />
1052
+ <br />
1053
+ <label><?php _e("Field Font Color:", 'custom-contact-forms'); ?></label>
1054
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_fontcolor; ?>" name="style[field_fontcolor]" />
1055
+ <br />
1056
+ <label><?php _e("Button Font Color:", 'custom-contact-forms'); ?></label>
1057
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->submit_fontcolor; ?>" name="style[submit_fontcolor]" />
1058
+ <br />
1059
+ <label><?php _e("Form Margin:", 'custom-contact-forms'); ?></label>
1060
+ <input type="text" maxlength="20" value="<?php echo $style->form_margin; ?>" name="style[form_margin]" />
1061
+ <br />
1062
+ <label><?php _e("Success Popover", 'custom-contact-forms'); ?><br />
1063
+ <?php _e("Font Color:", 'custom-contact-forms'); ?></label>
1064
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_fontcolor; ?>" name="style[success_popover_fontcolor]" />
1065
+ <br />
1066
+ <label><?php _e("Tooltip Font Size:", 'custom-contact-forms'); ?></label>
1067
+ <input type="text" maxlength="20" value="<?php echo $style->tooltip_fontsize; ?>" name="style[tooltip_fontsize]" />
1068
+ </td>
1069
+ <td><label><?php _e("Form Border Style:", 'custom-contact-forms'); ?></label>
1070
+ <select name="style[form_borderstyle]">
1071
+ <?php echo str_replace('<option>'.$style->form_borderstyle.'</option>', '<option selected="selected">'.$style->form_borderstyle.'</option>', $border_style_options); ?>
1072
+ </select>
1073
+ <br />
1074
+ <label><?php _e("Form Border Width:", 'custom-contact-forms'); ?></label>
1075
+ <input type="text" maxlength="20" value="<?php echo $style->form_borderwidth; ?>" name="style[form_borderwidth]" />
1076
+ <br />
1077
+ <label><?php _e("Form Border Color:", 'custom-contact-forms'); ?></label>
1078
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->form_bordercolor; ?>" name="style[form_bordercolor]" />
1079
+ <br />
1080
+ <label><?php _e("Field Border Color:", 'custom-contact-forms'); ?></label>
1081
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_bordercolor; ?>" name="style[field_bordercolor]" />
1082
+ <br />
1083
+ <label><?php _e("Field Border Style:", 'custom-contact-forms'); ?></label>
1084
+ <select name="style[field_borderstyle]">
1085
+ <?php echo str_replace('<option>'.$style->field_borderstyle.'</option>', '<option selected="selected">'.$style->field_borderstyle.'</option>', $border_style_options); ?>
1086
+ </select>
1087
+ <br />
1088
+ <label><?php _e("Success Popover", 'custom-contact-forms'); ?><br />
1089
+ <?php _e("Title Font Color:", 'custom-contact-forms'); ?></label>
1090
+ <input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontcolor; ?>" name="style[success_popover_title_fontcolor]" />
1091
+ <br />
1092
+ <label><?php _e("Field Border Roundness:", 'custom-contact-forms'); ?></label>
1093
+ <input name="style[field_borderround]" value="<?php echo $style->field_borderround; ?>" type="text" maxlength="20" />
1094
+ <br />
1095
+ <input type="hidden" class="object-type" name="object_type" value="style" />
1096
+ <input name="sid" type="hidden" class="object-id" value="<?php echo $style->id; ?>" />
1097
+ </td>
1098
+ </form>
1099
+ </tr>
1100
+ <?php
1101
+ $i++;
1102
+ }
1103
+ ?>
1104
+ </tbody>
1105
+ <tfoot>
1106
+ <tr>
1107
+ <th scope="col" class="manage-column"></th>
1108
+ <th scope="col" class="manage-column"></th>
1109
+ <th scope="col" class="manage-column"></th>
1110
+ <th scope="col" class="manage-column"></th>
1111
+ <th scope="col" class="manage-column"></th>
1112
+ <th scope="col" class="manage-column"></th>
1113
+ </tr>
1114
+ </tfoot>
1115
+ </table>
1116
+ <a name="contact-author"></a>
1117
+ <div id="contact-author" class="postbox">
1118
+ <h3 class="hndle"><span><?php _e("Report a Bug/Suggest a Feature", 'custom-contact-forms'); ?></span></h3>
1119
+ <div class="inside">
1120
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1121
+ <ul>
1122
+ <li>
1123
+ <label for="name"><?php _e("Your Name:", 'custom-contact-forms'); ?></label>
1124
+ <input id="name" type="text" name="name" maxlength="100" />
1125
+ </li>
1126
+ <li>
1127
+ <label for="email"><?php _e("Your Email:", 'custom-contact-forms'); ?></label>
1128
+ <input id="email" type="text" value="<?php echo get_option('admin_email'); ?>" name="email" maxlength="100" />
1129
+ </li>
1130
+ <li>
1131
+ <label for="message">* <?php _e("Your Message:", 'custom-contact-forms'); ?></label>
1132
+ <textarea id="message" name="message"></textarea>
1133
+ </li>
1134
+ <li>
1135
+ <label for="type">* <?php _e("Purpose of this message:", 'custom-contact-forms'); ?></label>
1136
+ <select id="type" name="type">
1137
+ <option><?php _e("Bug Report", 'custom-contact-forms'); ?></option>
1138
+ <option><?php _e("Suggest a Feature", 'custom-contact-forms'); ?></option>
1139
+ <option><?php _e("Plugin Question", 'custom-contact-forms'); ?></option>
1140
+ </select>
1141
+ </li>
1142
+ </ul>
1143
+ <p>
1144
+ <input type="submit" name="contact_author" value="<?php _e("Send Message", 'custom-contact-forms'); ?>" />
1145
+ </p>
1146
+ </form>
1147
+ </div>
1148
+ </div>
1149
+ <a name="custom-html"></a>
1150
+ <div id="custom-html" class="postbox">
1151
+ <h3 class="hndle"><span><?php _e("Custom HTML Forms (Advanced)", 'custom-contact-forms'); ?></span></h3>
1152
+ <div class="inside">
1153
+ <p><?php _e("If you know HTML and simply want to use this plugin to process form requests, this feature is for you.
1154
+ The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following: a) Keep the form action/method the same (yes the action is supposed to be empty), b) Include all the hidden fields shown below, c) provide a
1155
+ hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately.", 'custom-contact-forms'); ?></p>
1156
+ <textarea id="custom_html_textarea">
1157
+ &lt;form method=&quot;post&quot; action=&quot;&quot;&gt;
1158
+ &lt;input type=&quot;hidden&quot; name=&quot;ccf_customhtml&quot; value=&quot;1&quot; /&gt;
1159
+ &lt;input type=&quot;hidden&quot; name=&quot;success_message&quot; value=&quot;<?php _e("Thank you for filling out our form!", 'custom-contact-forms'); ?>&quot; /&gt;
1160
+ &lt;input type=&quot;hidden&quot; name=&quot;thank_you_page&quot; value=&quot;http://www.google.com&quot; /&gt;
1161
+ &lt;input type=&quot;hidden&quot; name=&quot;destination_email&quot; value=&quot;<?php echo $admin_options['default_to_email']; ?>&quot; /&gt;
1162
+ &lt;input type=&quot;hidden&quot; name=&quot;required_fields&quot; value=&quot;field_name1, field_name2&quot; /&gt;
1163
+
1164
+ &lt;!-- <?php _e("Build your form in here. It is recommended you only use this feature if you are experienced with HTML.
1165
+ The success_message field will add a popover containing the message when the form is completed successfully, the thank_you_page field will force
1166
+ the user to be redirected to that specific page on successful form completion. The required_fields hidden field is optional; to use it seperate
1167
+ the field names you want required by commas. Remember to use underscores instead of spaces in field names!", 'custom-contact-forms'); ?> --&gt;
1168
+
1169
+ &lt;/form&gt;</textarea>
1170
+ </div>
1171
+ </div>
1172
+ <a name="import-export"></a>
1173
+ <div id="import-export" class="postbox">
1174
+ <h3 class="hndle"><span><?php _e("Import / Export", 'custom-contact-forms'); ?></span></h3>
1175
+ <div class="inside">
1176
+ <form method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1177
+ <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
1178
+ <div class="export">
1179
+ <p><?php _e("Preforming a Custom Contact Forms export will create a file of the form
1180
+ ccf-export-xxxx.sql on your web server. The file created contains SQL that
1181
+ will recreate all the plugin data on any Wordpress installation. After Custom Contact Forms creates the export file, you will be prompted to download it. You can use this file as a backup in case your Wordpress database gets ruined.", 'custom-contact-forms'); ?></p>
1182
+ <input type="submit" name="ccf_export" value="<?php _e("Export All CCF Plugin Content", 'custom-contact-forms'); ?>" />
1183
+ </div>
1184
+ <div class="import">
1185
+ <p><?php _e("Browse to a CCF .sql export file to import Custom Contact Form data from another Wordpress installation to this one.", 'custom-contact-forms'); ?>
1186
+ <?php _e('There are two types of imports:', 'custom-contact-forms'); ?> <b><?php _e('Clear and Import', 'custom-contact-forms'); ?></b> <?php _e('and', 'custom-contact-forms'); ?> <b><?php _e('Merge Import.', 'custom-contact-forms'); ?></b>
1187
+ <span><?php _e('"Clear and Import" deletes all current data and imports; this is the safest way to import and will always work; clearing all CCF data before importing prevents any conflicts from occuring. "Merge Import" attemps to merge the import data with all your current CCF data; this might not work for example if you have a form with the same slug or ID as a form you are importing. Before you attempt any type of import, you should always download a backup, by clicking the "Export All" button.', 'custom-contact-forms'); ?></span> </p>
1188
+ <p class="choose_import"><?php _e("Choose What You Want to Use from the Import File:", 'custom-contact-forms'); ?></p>
1189
+ <ul>
1190
+ <li>
1191
+ <input type="checkbox" checked="checked" name="ccf_import_overwrite_settings" value="1" />
1192
+ <label for="ccf_import_overwrite_settings"><?php _e("Use General Settings", 'custom-contact-forms'); ?></label>
1193
+ </li>
1194
+ <li>
1195
+ <input type="checkbox" checked="checked" name="ccf_import_forms" value="1" />
1196
+ <label for="ccf_import_forms"><?php _e("Forms", 'custom-contact-forms'); ?></label>
1197
+ </li>
1198
+ <li>
1199
+ <input type="checkbox" checked="checked" name="ccf_import_saved_submissions" value="1" />
1200
+ <label for="ccf_import_saved_submissions"><?php _e("Form Submissions", 'custom-contact-forms'); ?></label>
1201
+ </li>
1202
+ <li>
1203
+ <input type="checkbox" checked="checked" name="ccf_import_fields" value="1" />
1204
+ <label for="ccf_import_fields"><?php _e("Fields", 'custom-contact-forms'); ?></label>
1205
+ </li>
1206
+ <li>
1207
+ <input type="checkbox" checked="checked" name="ccf_import_forms" value="1" />
1208
+ <label for="ccf_import_forms"><?php _e("Forms", 'custom-contact-forms'); ?></label>
1209
+ </li>
1210
+ <li>
1211
+ <input type="checkbox" checked="checked" name="ccf_import_field_options" value="1" />
1212
+ <label for="ccf_import_field_options"><?php _e("Field Options", 'custom-contact-forms'); ?></label>
1213
+ </li>
1214
+ <li>
1215
+ <input type="checkbox" checked="checked" name="ccf_import_styles" value="1" />
1216
+ <label for="ccf_import_styles"><?php _e("Styles", 'custom-contact-forms'); ?></label>
1217
+ </li>
1218
+ </ul>
1219
+ <p class="choose_import"><label for="import_file"><?php _e("Choose an Import File:", 'custom-contact-forms'); ?></label> <input type="file" name="import_file" /></p>
1220
+ <input name="ccf_clear_import" type="submit" value="<?php _e("Clear and Import", 'custom-contact-forms'); ?>" />
1221
+ <input name="ccf_merge_import" type="submit" value="<?php _e("Merge Import", 'custom-contact-forms'); ?>" />
1222
+ <input type="checkbox" name="ccf_import_confirm" value="1" /> <?php _e('Yes, I want to do this and have created a backup.', 'custom-contact-forms'); ?>
1223
+ </div>
1224
+ </form>
1225
+ </div>
1226
+ </div>
1227
+ <a name="plugin-news"></a>
1228
+ <div id="plugin-news" class="postbox">
1229
+ <h3 class="hndle"><span><?php _e("Custom Contact Forms Plugin News", 'custom-contact-forms'); ?></span></h3>
1230
+ <div class="inside">
1231
+ <?php $this->displayPluginNewsFeed(); ?>
1232
+ </div>
1233
+ </div>
1234
+ </div>
custom-contact-forms-db.php CHANGED
@@ -6,34 +6,11 @@
6
  */
7
  if (!class_exists('CustomContactFormsDB')) {
8
  class CustomContactFormsDB {
9
- var $forms_table;
10
- var $fields_table;
11
- var $styles_table;
12
- var $field_options_table;
13
  var $cache = array();
14
- function CustomContactFormsDB() {
15
- global $wpdb;
16
- $table_prefix = $wpdb->prefix;
17
- $this->forms_table = $table_prefix . 'customcontactforms_forms';
18
- $this->fields_table = $table_prefix . 'customcontactforms_fields';
19
- $this->styles_table = $table_prefix . 'customcontactforms_styles';
20
- $this->field_options_table = $table_prefix . 'customcontactforms_field_options';
21
- }
22
-
23
- function encodeOption($option) {
24
- return htmlspecialchars(stripslashes($option), ENT_QUOTES);
25
- }
26
-
27
- function decodeOption($option, $strip_slashes = 1, $decode_html_chars = 1) {
28
- if ($strip_slashes == 1) $option = stripslashes($option);
29
- if ($decode_html_chars == 1) $option = html_entity_decode($option);
30
- return $option;
31
- }
32
-
33
  function createTables() {
34
  global $wpdb;
35
  if(!$this->formsTableExists()) {
36
- $sql1 = " CREATE TABLE `".$this->forms_table."` (
37
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
38
  `form_slug` VARCHAR( 100 ) NOT NULL ,
39
  `form_title` VARCHAR( 200 ) NOT NULL ,
@@ -45,8 +22,18 @@ if (!class_exists('CustomContactFormsDB')) {
45
  PRIMARY KEY ( `id` )
46
  ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
47
  $wpdb->query($sql1);
 
 
 
 
 
 
 
 
 
 
48
  } if(!$this->fieldOptionsTableExists()) {
49
- $sql5 = " CREATE TABLE `".$this->field_options_table."` (
50
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
51
  `option_slug` VARCHAR( 100 ) NOT NULL ,
52
  `option_label` VARCHAR( 200 ) NOT NULL ,
@@ -55,7 +42,7 @@ if (!class_exists('CustomContactFormsDB')) {
55
  ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
56
  $wpdb->query($sql5);
57
  } if(!$this->fieldsTableExists()) {
58
- $sql2 = "CREATE TABLE `".$this->fields_table."` (
59
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
60
  `field_slug` VARCHAR( 50 ) NOT NULL ,
61
  `field_label` VARCHAR( 100 ) NOT NULL ,
@@ -67,30 +54,29 @@ if (!class_exists('CustomContactFormsDB')) {
67
  ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
68
  $wpdb->query($sql2);
69
  } if(!$this->stylesTableExists()) {
70
- // Title, input, textarea, label, form, submit
71
- $sql3 = "CREATE TABLE `".$this->styles_table."` (
72
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
73
  `style_slug` VARCHAR( 30 ) NOT NULL ,
74
  `input_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
75
  `textarea_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
76
  `textarea_height` VARCHAR( 10 ) NOT NULL DEFAULT '100px',
77
  `form_borderwidth` VARCHAR( 10 ) NOT NULL DEFAULT '0px',
78
- `label_width` VARCHAR( 10 ) NOT NULL DEFAULT '110px',
79
- `form_width` VARCHAR( 10 ) NOT NULL DEFAULT '500px',
80
- `submit_width` VARCHAR( 10 ) NOT NULL DEFAULT '80px',
81
- `submit_height` VARCHAR( 10 ) NOT NULL DEFAULT '35px',
82
  `label_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1em',
83
  `title_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.2em',
84
- `field_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1em',
85
  `submit_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.1em',
86
- `field_bordercolor` VARCHAR( 10 ) NOT NULL DEFAULT 'blue',
87
- `form_borderstyle` VARCHAR( 30 ) NOT NULL DEFAULT 'dashed',
88
- `form_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT 'black',
89
- `field_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '#000000',
90
- `label_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '#333333',
91
- `title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '#333333',
92
- `submit_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '#333333',
93
- `form_fontfamily` VARCHAR( 150 ) NOT NULL DEFAULT 'Verdana, Tahoma, Arial',
94
  PRIMARY KEY ( `id` )
95
  ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
96
  $wpdb->query($sql3);
@@ -104,82 +90,91 @@ if (!class_exists('CustomContactFormsDB')) {
104
 
105
  function updateTables() {
106
  global $wpdb;
107
- if (!$this->columnExists('user_field', $this->fields_table))
108
- $wpdb->query("ALTER TABLE `" . $this->fields_table . "` ADD `user_field` INT( 1 ) NOT NULL DEFAULT '1'");
109
- if (!$this->columnExists('form_style', $this->forms_table))
110
- $wpdb->query("ALTER TABLE `" . $this->forms_table . "` ADD `form_style` INT( 10 ) NOT NULL DEFAULT '0'");
111
- if (!$this->columnExists('form_email', $this->forms_table))
112
- $wpdb->query("ALTER TABLE `" . $this->forms_table . "` ADD `form_email` VARCHAR( 50 ) NOT NULL");
113
- if (!$this->columnExists('form_success_message', $this->forms_table))
114
- $wpdb->query("ALTER TABLE `" . $this->forms_table . "` ADD `form_success_message` TEXT NOT NULL");
115
- if (!$this->columnExists('form_thank_you_page', $this->forms_table))
116
- $wpdb->query("ALTER TABLE `" . $this->forms_table . "` ADD `form_thank_you_page` VARCHAR ( 200 ) NOT NULL");
117
- if (!$this->columnExists('field_backgroundcolor', $this->styles_table))
118
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `field_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT '#efefef'");
119
- if (!$this->columnExists('field_borderstyle', $this->styles_table))
120
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `field_borderstyle` VARCHAR( 20 ) NOT NULL DEFAULT 'solid'");
121
- if (!$this->columnExists('form_success_title', $this->forms_table))
122
- $wpdb->query("ALTER TABLE `" . $this->forms_table . "` ADD `form_success_title` VARCHAR( 150 ) NOT NULL DEFAULT 'Form Success!'");
123
- if (!$this->columnExists('form_padding', $this->styles_table))
124
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `form_padding` VARCHAR( 20 ) NOT NULL DEFAULT '4px'");
125
- if (!$this->columnExists('form_margin', $this->styles_table))
126
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `form_margin` VARCHAR( 20 ) NOT NULL DEFAULT '4px'");
127
- if (!$this->columnExists('title_margin', $this->styles_table))
128
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `title_margin` VARCHAR( 20 ) NOT NULL DEFAULT '2px'");
129
- if (!$this->columnExists('label_margin', $this->styles_table))
130
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `label_margin` VARCHAR( 20 ) NOT NULL DEFAULT '3px'");
131
- if (!$this->columnExists('textarea_backgroundcolor', $this->styles_table))
132
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `textarea_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT '#efefef'");
133
- if (!$this->columnExists('success_popover_bordercolor', $this->styles_table))
134
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `success_popover_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT '#efefef'");
135
- if (!$this->columnExists('dropdown_width', $this->styles_table))
136
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `dropdown_width` VARCHAR( 20 ) NOT NULL DEFAULT 'auto'");
137
- if (!$this->columnExists('success_popover_fontsize', $this->styles_table))
138
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `success_popover_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '12px'");
139
- if (!$this->columnExists('success_popover_title_fontsize', $this->styles_table))
140
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `success_popover_title_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '1.3em'");
141
- if (!$this->columnExists('success_popover_height', $this->styles_table))
142
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `success_popover_height` VARCHAR( 20 ) NOT NULL DEFAULT '200px'");
143
- if (!$this->columnExists('success_popover_fontcolor', $this->styles_table))
144
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `success_popover_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '#333333'");
145
- if (!$this->columnExists('success_popover_title_fontcolor', $this->styles_table))
146
- $wpdb->query("ALTER TABLE `" . $this->styles_table . "` ADD `success_popover_title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '#333333'");
147
- if (!$this->columnExists('field_instructions', $this->fields_table))
148
- $wpdb->query("ALTER TABLE `" . $this->fields_table . "` ADD `field_instructions` TEXT NOT NULL");
149
- if (!$this->columnExists('field_options', $this->fields_table))
150
- $wpdb->query("ALTER TABLE `" . $this->fields_table . "` ADD `field_options` VARCHAR( 300 ) NOT NULL");
151
- if (!$this->columnExists('field_required', $this->fields_table))
152
- $wpdb->query("ALTER TABLE `" . $this->fields_table . "` ADD `field_required` INT( 1 ) NOT NULL DEFAULT '0'");
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  }
154
 
155
  function insertFixedFields() {
156
- $captcha = array('field_slug' => 'captcha', 'field_label' => 'Type the numbers.', 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '100', 'user_field' => 0, 'field_instructions' => 'Type the numbers displayed in the image above.');
157
- $ishuman = array('field_slug' => 'ishuman', 'field_label' => 'Check if you are human.', 'field_type' => 'Checkbox', 'field_value' => '1', 'field_maxlength' => '0', 'user_field' => 0, 'field_instructions' => 'This helps us prevent spam.');
158
- $fixedEmail = array('field_slug' => 'fixedEmail', 'field_label' => 'Your Email', 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '100', 'user_field' => 0, 'field_instructions' => 'Please enter your email address.');
 
159
  if (!$this->fieldSlugExists('captcha'))
160
- $this->insertField($captcha);
161
  if (!$this->fieldSlugExists('ishuman'))
162
- $this->insertField($ishuman);
163
  if (!$this->fieldSlugExists('fixedEmail'))
164
- $this->insertField($fixedEmail);
165
-
 
166
  }
167
 
168
- /*function columnExists($column, $table) {
169
- global $wpdb;
170
- $tests = $wpdb->get_results("SELECT * FROM INFORMATION_SCHEMA.columns WHERE table_name = '$table' AND column_name = '$column' LIMIT 0 , 30");
171
- return (!empty($test[0]) && $test[0]->COLUMN_NAME == $column);
172
- }*/
173
-
174
  function columnExists($column, $table) {
175
  global $wpdb;
176
  if (!is_array($this->cache[$table]))
177
  $this->cache[$table] = array();
178
- if (empty($this->cache[$table][columns]))
179
- $this->cache[$table][columns] = $wpdb->get_results('SHOW COLUMNS FROM ' . $table, ARRAY_A);
180
- $col_array = $this->cache[$table][columns];
181
  foreach ($col_array as $col) {
182
- if ($col[Field] == $column)
183
  return true;
184
  }
185
  return false;
@@ -187,124 +182,129 @@ if (!class_exists('CustomContactFormsDB')) {
187
 
188
  function insertForm($form) {
189
  global $wpdb;
190
- if (empty($form) or empty($form[form_slug]) or $this->formSlugExists($this->formatSlug($form[form_slug]))) return false;
191
- $form[form_slug] = $this->formatSlug($form[form_slug]);
192
- $form = array_map(array(&$this, 'encodeOption'), $form);
193
- $wpdb->insert($this->forms_table, $form);
 
194
  return $wpdb->insert_id;
195
  }
196
 
197
- function insertField($field) {
198
  global $wpdb;
199
- if (empty($field) or empty($field[field_slug]) or $this->fieldSlugExists($this->formatSlug($field[field_slug]))) return false;
200
- $field[field_slug] = $this->formatSlug($field[field_slug]);
201
- foreach ($field as $key => $value) {
202
- if ($key != 'field_slug')
203
- $field[$key] = $this->encodeOption($value);
204
- }
205
- $wpdb->insert($this->fields_table, $field);
206
  return $wpdb->insert_id;
207
  }
208
 
209
  function insertFieldOption($option) {
210
  global $wpdb;
211
- if (empty($option) or empty($option[option_slug]) or $this->fieldOptionsSlugExists($this->formatSlug($option[option_slug]))) return false;
212
- $option[option_slug] = $this->formatSlug($option[option_slug]);
213
- $option = array_map(array(&$this, 'encodeOption'), $option);
214
- $wpdb->insert($this->field_options_table, $option);
 
215
  return $wpdb->insert_id;
216
  }
217
 
218
  function insertStyle($style) {
219
  global $wpdb;
220
- if (empty($style) or empty($style[style_slug]) or $this->styleSlugExists($this->formatSlug($style[style_slug]))) return false;
221
- $style[style_slug] = $this->formatSlug($style[style_slug]);
222
- foreach ($style as $key => $value) {
223
- if ($key != 'style_slug')
224
- $style[$key] = $this->formatStyle($this->encodeOption($value));
225
- }
226
- $wpdb->insert($this->styles_table, $style);
227
  return $wpdb->insert_id;
228
  }
229
 
230
 
231
  function fieldsTableExists() {
232
  global $wpdb;
233
- return ($wpdb->get_var("show tables like '". $this->fields_table . "'") == $this->fields_table);
234
  }
235
 
236
  function formsTableExists() {
237
  global $wpdb;
238
- return ($wpdb->get_var("show tables like '". $this->forms_table . "'") == $this->forms_table);
239
  }
240
 
241
  function stylesTableExists() {
242
  global $wpdb;
243
- return ($wpdb->get_var("show tables like '". $this->styles_table . "'") == $this->styles_table);
244
  }
245
 
246
  function fieldOptionsTableExists() {
247
  global $wpdb;
248
- return ($wpdb->get_var("show tables like '". $this->field_options_table . "'") == $this->field_options_table);
 
 
 
 
 
249
  }
250
 
251
  function updateForm($form, $fid) {
252
  global $wpdb;
253
- if (!empty($form[form_slug])) {
254
- $test = $this->selectForm('', $this->formatSlug($form[form_slug]));
255
  if (!empty($test) and $test->id != $fid) return false;
256
- $form[form_slug] = $this->formatSlug($form[form_slug]);
257
  }
258
- $form = array_map(array(&$this, 'encodeOption'), $form);
259
- $wpdb->update($this->forms_table, $form, array('id' => $fid));
 
260
  return true;
261
  }
262
 
263
  function updateField($field, $fid) {
264
  global $wpdb;
265
- if (!empty($field[field_slug])) {
266
- $test = $this->selectField('', $this->formatSlug($field[field_slug]));
267
- if (!empty($test) and $test->id != $fid)
268
  return false;
269
- $field[field_slug] = $this->formatSlug($field[field_slug]);
270
  }
271
- $field = array_map(array(&$this, 'encodeOption'), $field);
272
- $wpdb->update($this->fields_table, $field, array('id' => $fid));
 
273
  return true;
274
  }
275
 
276
  function updateFieldOption($option, $oid) {
277
  global $wpdb;
278
- if (!empty($option[option_slug])) {
279
- $test = $this->selectFieldOption('', $this->formatSlug($option[option_slug]));
280
  if (!empty($test) and $test->id != $oid)
281
  return false;
282
- $option[option_slug] = $this->formatSlug($option[option_slug]);
283
  }
284
- $option = array_map(array(&$this, 'encodeOption'), $option);
285
- $wpdb->update($this->field_options_table, $option, array('id' => $oid));
 
286
  return true;
287
  }
288
 
289
  function updateStyle($style, $sid) {
290
  global $wpdb;
291
- if (empty($style[style_slug])) return false;
292
- $test = $this->selectStyle('', $this->formatSlug($style[style_slug]));
293
  if (!empty($test) and $test->id != $sid) // if style_slug is different then make sure it is unique
294
  return false;
295
- $style[style_slug] = $this->formatSlug($style[style_slug]);
296
- foreach ($style as $key => $value) {
297
- if ($key != 'style_slug')
298
- $style[$key] = $this->formatStyle($this->encodeOption($value));
299
- }
300
- $wpdb->update($this->styles_table, $style, array('id' => $sid));
301
  return true;
302
  }
303
 
304
  function deleteForm($fid, $slug = NULL) {
305
  global $wpdb;
306
  $where_params = ($slug == NULL) ? "id='$fid'" : "form_slug='$slug'";
307
- $wpdb->query("DELETE FROM " . $this->forms_table . ' WHERE ' . $where_params);
308
  return true;
309
  }
310
 
@@ -312,15 +312,21 @@ if (!class_exists('CustomContactFormsDB')) {
312
  global $wpdb;
313
  $this->dettachFieldAll($fid);
314
  $where_params = ($slug == NULL) ? "id='$fid'" : "field_slug='$slug'";
315
- $wpdb->query("DELETE FROM " . $this->fields_table . ' WHERE ' . $where_params);
316
  return false;
317
  }
318
 
 
 
 
 
 
 
319
  function deleteStyle($sid, $slug = NULL) {
320
  global $wpdb;
321
  $this->dettachStyleAll($sid);
322
  $where_params = ($slug == NULL) ? "id='$sid'" : "style_slug='$slug'";
323
- $wpdb->query("DELETE FROM " . $this->styles_table . ' WHERE ' . $where_params);
324
  return true;
325
  }
326
 
@@ -328,56 +334,80 @@ if (!class_exists('CustomContactFormsDB')) {
328
  global $wpdb;
329
  $this->dettachFieldOptionAll($oid);
330
  $where_params = ($slug == NULL) ? "id='$oid'" : "option_slug='$slug'";
331
- $wpdb->query("DELETE FROM " . $this->field_options_table . ' WHERE ' . $where_params);
332
  return true;
333
  }
334
 
 
 
 
 
 
 
 
 
 
 
 
335
  function selectAllForms() {
336
  global $wpdb;
337
- return $wpdb->get_results("SELECT * FROM " . $this->forms_table . " ORDER BY form_slug ASC");
338
  }
339
 
340
  function selectAllFields() {
341
  global $wpdb;
342
- return $wpdb->get_results("SELECT * FROM " . $this->fields_table . " ORDER BY field_slug ASC");
343
  }
344
 
345
  function selectAllFieldOptions() {
346
  global $wpdb;
347
- return $wpdb->get_results("SELECT * FROM " . $this->field_options_table . " ORDER BY option_slug ASC");
348
  }
349
 
350
  function selectAllStyles() {
351
  global $wpdb;
352
- return $wpdb->get_results("SELECT * FROM " . $this->styles_table . " ORDER BY style_slug ASC");
 
 
 
 
 
353
  }
354
 
355
  function selectForm($fid, $form_slug = '') {
356
  global $wpdb;
357
  $extra = (!empty($form_slug)) ? " or form_slug = '$form_slug'" : '';
358
- return $wpdb->get_row("SELECT * FROM " . $this->forms_table . " WHERE id='$fid' $extra");
359
  }
360
 
361
  function selectStyle($sid, $style_slug = '') {
362
  global $wpdb;
363
  $extra = (!empty($style_slug)) ? " or style_slug = '$style_slug'" : '';
364
- return $wpdb->get_row("SELECT * FROM " . $this->styles_table . " WHERE id='$sid' $extra");
365
  }
366
 
367
  function selectField($fid, $field_slug = '') {
368
  global $wpdb;
369
  $extra = (!empty($field_slug)) ? " or field_slug = '$field_slug'" : '';
370
- return $wpdb->get_row("SELECT * FROM " . $this->fields_table . " WHERE id='$fid'" . $extra);
371
  }
372
 
373
  function selectFieldOption($oid, $option_slug = '') {
374
  global $wpdb;
375
  $extra = (!empty($option_slug)) ? " or option_slug = '$option_slug'" : '';
376
- return $wpdb->get_row("SELECT * FROM " . $this->field_options_table . " WHERE id='$oid'" . $extra);
 
 
 
 
 
377
  }
378
 
379
  function addFieldToForm($field_id, $form_id) {
380
- $form = $this->selectForm($form_id, '');
 
 
 
381
  $fields = $this->getAttachedFieldsArray($form_id);
382
  if (!in_array($field_id, $fields)) {
383
  $new_fields = $form->form_fields . $field_id . ',';
@@ -388,7 +418,10 @@ if (!class_exists('CustomContactFormsDB')) {
388
  }
389
 
390
  function addFieldOptionToField($option_id, $field_id) {
 
 
391
  $field = $this->selectField($field_id);
 
392
  $options = $this->getAttachedFieldOptionsArray($field_id);
393
  if (!in_array($option_id, $options)) {
394
  $new_options = $field->field_options . $option_id . ',';
@@ -422,7 +455,18 @@ if (!class_exists('CustomContactFormsDB')) {
422
  }
423
  return false;
424
  }
425
-
 
 
 
 
 
 
 
 
 
 
 
426
  function dettachFieldAll($field_id) {
427
  $forms = $this->selectAllForms();
428
  foreach ($forms as $form)
@@ -435,17 +479,6 @@ if (!class_exists('CustomContactFormsDB')) {
435
  $this->dettachFieldOption($option_id, $field->id);
436
  }
437
 
438
- function dettachFieldOption($option_id, $field_id) {
439
- $options = $this->getAttachedFieldOptionsArray($field_id);
440
- if (!empty($options) && in_array($option_id, $options)) {
441
- $field = $this->selectField($field_id);
442
- $new_options = str_replace($option_id . ',', '', $field->field_options);
443
- $this->updateField(array('field_options' => $new_options), $field_id);
444
- return true;
445
- }
446
- return false;
447
- }
448
-
449
  function dettachStyleAll($style_id) {
450
  $forms = $this->selectAllForms();
451
  foreach ($forms as $form) {
@@ -480,6 +513,25 @@ if (!class_exists('CustomContactFormsDB')) {
480
  return (!empty($test));
481
  }
482
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  function insertDefaultContent($overwrite = false) {
484
  $field_slugs = array('name' => 'ccf_name', 'message' => 'ccf_message',
485
  'website' => 'ccf_website', 'phone' => 'ccf_phone', 'google' => 'ccf_google',
@@ -491,32 +543,32 @@ if (!class_exists('CustomContactFormsDB')) {
491
  foreach($option_slugs as $slug) $this->deleteFieldOption(0, $slug);
492
  foreach($form_slugs as $slug) $this->deleteForm(0, $slug);
493
  }
494
- $name_field = array('field_slug' => $field_slugs[name], 'field_label' => 'Your Name:',
495
- 'field_required' => 1, 'field_instructions' => 'Please enter your full name.',
496
  'field_maxlength' => '100', 'field_type' => 'Text');
497
- $message_field = array('field_slug' => $field_slugs[message], 'field_label' => 'Your Message:',
498
- 'field_required' => 0, 'field_instructions' => 'Enter any message or comment.',
499
  'field_maxlength' => 0, 'field_type' => 'Textarea');
500
- $website_field = array('field_slug' => $field_slugs[website], 'field_label' => 'Your Website:',
501
- 'field_required' => 0, 'field_instructions' => 'If you have a website, please enter it here.',
502
  'field_maxlength' => 200, 'field_type' => 'Text');
503
- $phone_field = array('field_slug' => $field_slugs[phone], 'field_label' => 'Your Phone Number:',
504
- 'field_required' => 0, 'field_instructions' => 'Please enter your phone number.',
505
  'field_maxlength' => 30, 'field_type' => 'Text');
506
- $google_field = array('field_slug' => $field_slugs[google], 'field_label' => 'Did you find my website through Google?',
507
- 'field_required' => 0, 'field_instructions' => 'If you found my website through Google, check this box.',
508
- 'field_maxlength' => 0, 'field_type' => 'Checkbox');
509
- $contact_method_field = array('field_slug' => $field_slugs[contact_method], 'field_label' => 'How should we contact you?',
510
- 'field_required' => 1, 'field_instructions' => 'By which method we should contact you?',
511
  'field_maxlength' => 0, 'field_type' => 'Dropdown');
512
  $email_field = $this->selectField(0, 'fixedEmail');
513
  $captcha_field = $this->selectField(0, 'captcha');
514
- $email_option = array('option_slug' => $option_slugs[email], 'option_label' => 'By Email');
515
- $phone_option = array('option_slug' => $option_slugs[phone], 'option_label' => 'By Phone');
516
- $nocontact_option = array('option_slug' => $option_slugs[nocontact], 'option_label' => 'Do Not Contact Me');
517
- $contact_form = array('form_slug' => $form_slugs[contact_form], 'form_title' => 'Contact Form', 'form_method' => 'Post',
518
- 'submit_button_text' => 'Send Message', 'form_email' => get_option('admin_email'), 'form_success_message' => 'Thank you for filling out our contact form. We will contact you very soon by the way you specified.',
519
- 'form_success_title' => 'Thank You!', 'form_style' => 0);
520
  $name_field_id = $this->insertField($name_field);
521
  $message_field_id = $this->insertField($message_field);
522
  $website_field_id = $this->insertField($website_field);
6
  */
7
  if (!class_exists('CustomContactFormsDB')) {
8
  class CustomContactFormsDB {
 
 
 
 
9
  var $cache = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  function createTables() {
11
  global $wpdb;
12
  if(!$this->formsTableExists()) {
13
+ $sql1 = " CREATE TABLE `".CCF_FORMS_TABLE."` (
14
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
15
  `form_slug` VARCHAR( 100 ) NOT NULL ,
16
  `form_title` VARCHAR( 200 ) NOT NULL ,
22
  PRIMARY KEY ( `id` )
23
  ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
24
  $wpdb->query($sql1);
25
+ } if(!$this->userDataTableExists()) {
26
+ $sql7 = " CREATE TABLE `".CCF_USER_DATA_TABLE."` (
27
+ `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
28
+ `data_time` INT( 11 ) NOT NULL DEFAULT '0',
29
+ `data_formid` INT( 11 ) NOT NULL ,
30
+ `data_formpage` VARCHAR ( 250 ) NOT NULL ,
31
+ `data_value` LONGTEXT NOT NULL ,
32
+ PRIMARY KEY ( `id` )
33
+ ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
34
+ $wpdb->query($sql7);
35
  } if(!$this->fieldOptionsTableExists()) {
36
+ $sql5 = " CREATE TABLE `".CCF_FIELD_OPTIONS_TABLE."` (
37
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
38
  `option_slug` VARCHAR( 100 ) NOT NULL ,
39
  `option_label` VARCHAR( 200 ) NOT NULL ,
42
  ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
43
  $wpdb->query($sql5);
44
  } if(!$this->fieldsTableExists()) {
45
+ $sql2 = "CREATE TABLE `".CCF_FIELDS_TABLE."` (
46
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
47
  `field_slug` VARCHAR( 50 ) NOT NULL ,
48
  `field_label` VARCHAR( 100 ) NOT NULL ,
54
  ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
55
  $wpdb->query($sql2);
56
  } if(!$this->stylesTableExists()) {
57
+ $sql3 = "CREATE TABLE `".CCF_STYLES_TABLE."` (
 
58
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
59
  `style_slug` VARCHAR( 30 ) NOT NULL ,
60
  `input_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
61
  `textarea_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
62
  `textarea_height` VARCHAR( 10 ) NOT NULL DEFAULT '100px',
63
  `form_borderwidth` VARCHAR( 10 ) NOT NULL DEFAULT '0px',
64
+ `label_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
65
+ `form_width` VARCHAR( 10 ) NOT NULL DEFAULT '100%',
66
+ `submit_width` VARCHAR( 10 ) NOT NULL DEFAULT 'auto',
67
+ `submit_height` VARCHAR( 10 ) NOT NULL DEFAULT '30px',
68
  `label_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1em',
69
  `title_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.2em',
70
+ `field_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.3em',
71
  `submit_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.1em',
72
+ `field_bordercolor` VARCHAR( 10 ) NOT NULL DEFAULT '999999',
73
+ `form_borderstyle` VARCHAR( 30 ) NOT NULL DEFAULT 'none',
74
+ `form_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT '',
75
+ `field_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
76
+ `label_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
77
+ `title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
78
+ `submit_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
79
+ `form_fontfamily` VARCHAR( 150 ) NOT NULL DEFAULT 'Tahoma, Verdana, Arial',
80
  PRIMARY KEY ( `id` )
81
  ) ENGINE = MYISAM AUTO_INCREMENT=1 ";
82
  $wpdb->query($sql3);
90
 
91
  function updateTables() {
92
  global $wpdb;
93
+ if (!$this->columnExists('user_field', CCF_FIELDS_TABLE))
94
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `user_field` INT( 1 ) NOT NULL DEFAULT '1'");
95
+ if (!$this->columnExists('form_style', CCF_FORMS_TABLE))
96
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_style` INT( 10 ) NOT NULL DEFAULT '0'");
97
+ if (!$this->columnExists('form_email', CCF_FORMS_TABLE))
98
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_email` VARCHAR( 50 ) NOT NULL");
99
+ if (!$this->columnExists('form_success_message', CCF_FORMS_TABLE))
100
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_success_message` TEXT NOT NULL");
101
+ if (!$this->columnExists('form_thank_you_page', CCF_FORMS_TABLE))
102
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_thank_you_page` VARCHAR ( 200 ) NOT NULL");
103
+ if (!$this->columnExists('field_backgroundcolor', CCF_STYLES_TABLE))
104
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'f5f5f5'");
105
+ if (!$this->columnExists('field_borderstyle', CCF_STYLES_TABLE))
106
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_borderstyle` VARCHAR( 20 ) NOT NULL DEFAULT 'solid'");
107
+ if (!$this->columnExists('form_success_title', CCF_FORMS_TABLE))
108
+ $wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_success_title` VARCHAR( 150 ) NOT NULL DEFAULT '".__('Form Success!', 'custom-contact-forms')."'");
109
+ if (!$this->columnExists('form_padding', CCF_STYLES_TABLE))
110
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_padding` VARCHAR( 20 ) NOT NULL DEFAULT '8px'");
111
+ if (!$this->columnExists('form_margin', CCF_STYLES_TABLE))
112
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_margin` VARCHAR( 20 ) NOT NULL DEFAULT '7px'");
113
+ if (!$this->columnExists('title_margin', CCF_STYLES_TABLE))
114
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `title_margin` VARCHAR( 20 ) NOT NULL DEFAULT '4px'");
115
+ if (!$this->columnExists('label_margin', CCF_STYLES_TABLE))
116
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `label_margin` VARCHAR( 20 ) NOT NULL DEFAULT '6px'");
117
+ if (!$this->columnExists('textarea_backgroundcolor', CCF_STYLES_TABLE))
118
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `textarea_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'f5f5f5'");
119
+ if (!$this->columnExists('success_popover_bordercolor', CCF_STYLES_TABLE))
120
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT 'efefef'");
121
+ if (!$this->columnExists('dropdown_width', CCF_STYLES_TABLE))
122
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `dropdown_width` VARCHAR( 20 ) NOT NULL DEFAULT 'auto'");
123
+ if (!$this->columnExists('success_popover_fontsize', CCF_STYLES_TABLE))
124
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '12px'");
125
+ if (!$this->columnExists('success_popover_title_fontsize', CCF_STYLES_TABLE))
126
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_title_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '1.3em'");
127
+ if (!$this->columnExists('success_popover_height', CCF_STYLES_TABLE))
128
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_height` VARCHAR( 20 ) NOT NULL DEFAULT '200px'");
129
+ if (!$this->columnExists('success_popover_fontcolor', CCF_STYLES_TABLE))
130
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333'");
131
+ if (!$this->columnExists('success_popover_title_fontcolor', CCF_STYLES_TABLE))
132
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333'");
133
+ if (!$this->columnExists('field_instructions', CCF_FIELDS_TABLE))
134
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_instructions` TEXT NOT NULL");
135
+ if (!$this->columnExists('field_options', CCF_FIELDS_TABLE))
136
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_options` VARCHAR( 300 ) NOT NULL");
137
+ if (!$this->columnExists('field_required', CCF_FIELDS_TABLE))
138
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_required` INT( 1 ) NOT NULL DEFAULT '0'");
139
+ if (!$this->columnExists('form_backgroundcolor', CCF_STYLES_TABLE))
140
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
141
+ if (!$this->columnExists('field_borderround', CCF_STYLES_TABLE))
142
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_borderround` VARCHAR( 20 ) NOT NULL DEFAULT '6px'");
143
+ if (!$this->columnExists('tooltip_backgroundcolor', CCF_STYLES_TABLE))
144
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT '000000'");
145
+ if (!$this->columnExists('tooltip_fontsize', CCF_STYLES_TABLE))
146
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_fontsize` VARCHAR( 20 ) NOT NULL DEFAULT '12px'");
147
+ if (!$this->columnExists('tooltip_fontcolor', CCF_STYLES_TABLE))
148
+ $wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `tooltip_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
149
+ if (!$this->columnExists('field_class', CCF_FIELDS_TABLE))
150
+ $wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_class` VARCHAR( 50 ) NOT NULL");
151
+
152
  }
153
 
154
  function insertFixedFields() {
155
+ $captcha = array('field_slug' => 'captcha', 'field_label' => __('Type the numbers.', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '100', 'user_field' => 0, 'field_instructions' => 'Type the numbers displayed in the image above.');
156
+ $ishuman = array('field_slug' => 'ishuman', 'field_label' => __('Check if you are human.', 'custom-contact-forms'), 'field_type' => 'Checkbox', 'field_value' => '1', 'field_maxlength' => '0', 'user_field' => 0, 'field_instructions' => 'This helps us prevent spam.');
157
+ $fixedEmail = array('field_slug' => 'fixedEmail', 'field_label' => __('Your Email', 'custom-contact-forms'), 'field_type' => 'Text', 'field_value' => '', 'field_maxlength' => '100', 'user_field' => 0, 'field_instructions' => 'Please enter your email address.');
158
+ $reset = array('field_slug' => 'resetButton', 'field_type' => 'Reset', 'field_value' => __('Reset Form', 'custom-contact-forms'), 'user_field' => 0);
159
  if (!$this->fieldSlugExists('captcha'))
160
+ $this->insertField($captcha, true);
161
  if (!$this->fieldSlugExists('ishuman'))
162
+ $this->insertField($ishuman, true);
163
  if (!$this->fieldSlugExists('fixedEmail'))
164
+ $this->insertField($fixedEmail, true);
165
+ if (!$this->fieldSlugExists('resetButton'))
166
+ $this->insertField($reset, true);
167
  }
168
 
 
 
 
 
 
 
169
  function columnExists($column, $table) {
170
  global $wpdb;
171
  if (!is_array($this->cache[$table]))
172
  $this->cache[$table] = array();
173
+ if (empty($this->cache[$table]['columns']))
174
+ $this->cache[$table]['columns'] = $wpdb->get_results('SHOW COLUMNS FROM ' . $table, ARRAY_A);
175
+ $col_array = $this->cache[$table]['columns'];
176
  foreach ($col_array as $col) {
177
+ if ($col['Field'] == $column)
178
  return true;
179
  }
180
  return false;
182
 
183
  function insertForm($form) {
184
  global $wpdb;
185
+ if (empty($form) or empty($form['form_slug']) or $this->formSlugExists($this->formatSlug($form['form_slug']))) return false;
186
+ $form['form_slug'] = $this->formatSlug($form['form_slug']);
187
+ foreach ($form as $key => $value)
188
+ $form[$key] = CustomContactFormsStatic::encodeOption($value);
189
+ $wpdb->insert(CCF_FORMS_TABLE, $form);
190
  return $wpdb->insert_id;
191
  }
192
 
193
+ function insertField($field, $fixed = false) {
194
  global $wpdb;
195
+ if (empty($field) or empty($field['field_slug']) or (array_key_exists($this->formatSlug($field['field_slug']), $GLOBALS['ccf_fixed_fields']) && !$fixed) or $this->fieldSlugExists($this->formatSlug($field['field_slug'])))
196
+ return false;
197
+ $field['field_slug'] = $this->formatSlug($field['field_slug']);
198
+ foreach ($field as $key => $value)
199
+ $field[$key] = CustomContactFormsStatic::encodeOption($value);
200
+ $wpdb->insert(CCF_FIELDS_TABLE, $field);
 
201
  return $wpdb->insert_id;
202
  }
203
 
204
  function insertFieldOption($option) {
205
  global $wpdb;
206
+ if (empty($option) or empty($option['option_slug']) or $this->fieldOptionsSlugExists($this->formatSlug($option['option_slug']))) return false;
207
+ $option['option_slug'] = $this->formatSlug($option['option_slug']);
208
+ foreach ($option as $key => $value)
209
+ $option[$key] = CustomContactFormsStatic::encodeOption($value);
210
+ $wpdb->insert(CCF_FIELD_OPTIONS_TABLE, $option);
211
  return $wpdb->insert_id;
212
  }
213
 
214
  function insertStyle($style) {
215
  global $wpdb;
216
+ if (empty($style) or empty($style['style_slug']) or $this->styleSlugExists($this->formatSlug($style['style_slug']))) return false;
217
+ $style['style_slug'] = $this->formatSlug($style['style_slug']);
218
+ foreach ($style as $key => $value)
219
+ $style[$key] = CustomContactFormsStatic::encodeOption($value);
220
+ $wpdb->insert(CCF_STYLES_TABLE, $style);
 
 
221
  return $wpdb->insert_id;
222
  }
223
 
224
 
225
  function fieldsTableExists() {
226
  global $wpdb;
227
+ return ($wpdb->get_var("show tables like '". CCF_FIELDS_TABLE . "'") == CCF_FIELDS_TABLE);
228
  }
229
 
230
  function formsTableExists() {
231
  global $wpdb;
232
+ return ($wpdb->get_var("show tables like '". CCF_FORMS_TABLE . "'") == CCF_FORMS_TABLE);
233
  }
234
 
235
  function stylesTableExists() {
236
  global $wpdb;
237
+ return ($wpdb->get_var("show tables like '". CCF_STYLES_TABLE . "'") == CCF_STYLES_TABLE);
238
  }
239
 
240
  function fieldOptionsTableExists() {
241
  global $wpdb;
242
+ return ($wpdb->get_var("show tables like '". CCF_FIELD_OPTIONS_TABLE . "'") == CCF_FIELD_OPTIONS_TABLE);
243
+ }
244
+
245
+ function userDataTableExists() {
246
+ global $wpdb;
247
+ return ($wpdb->get_var("show tables like '". CCF_USER_DATA_TABLE . "'") == CCF_USER_DATA_TABLE);
248
  }
249
 
250
  function updateForm($form, $fid) {
251
  global $wpdb;
252
+ if (!empty($form['form_slug'])) {
253
+ $test = $this->selectForm('', $this->formatSlug($form['form_slug']));
254
  if (!empty($test) and $test->id != $fid) return false;
255
+ $form['form_slug'] = $this->formatSlug($form['form_slug']);
256
  }
257
+ foreach ($form as $key => $value)
258
+ $form[$key] = CustomContactFormsStatic::encodeOption($value);
259
+ $wpdb->update(CCF_FORMS_TABLE, $form, array('id' => $fid));
260
  return true;
261
  }
262
 
263
  function updateField($field, $fid) {
264
  global $wpdb;
265
+ if (!empty($field['field_slug'])) {
266
+ $test = $this->selectField('', $this->formatSlug($field['field_slug']));
267
+ if ((!empty($test) and $test->id != $fid) or array_key_exists($this->formatSlug($field['field_slug']), $GLOBALS['ccf_fixed_fields']))
268
  return false;
269
+ $field['field_slug'] = $this->formatSlug($field['field_slug']);
270
  }
271
+ foreach ($field as $key => $value)
272
+ $field[$key] = CustomContactFormsStatic::encodeOption($value);
273
+ $wpdb->update(CCF_FIELDS_TABLE, $field, array('id' => $fid));
274
  return true;
275
  }
276
 
277
  function updateFieldOption($option, $oid) {
278
  global $wpdb;
279
+ if (!empty($option['option_slug'])) {
280
+ $test = $this->selectFieldOption('', $this->formatSlug($option['option_slug']));
281
  if (!empty($test) and $test->id != $oid)
282
  return false;
283
+ $option['option_slug'] = $this->formatSlug($option['option_slug']);
284
  }
285
+ foreach ($option as $key => $value)
286
+ $option[$key] = CustomContactFormsStatic::encodeOption($value);
287
+ $wpdb->update(CCF_FIELD_OPTIONS_TABLE, $option, array('id' => $oid));
288
  return true;
289
  }
290
 
291
  function updateStyle($style, $sid) {
292
  global $wpdb;
293
+ if (empty($style['style_slug'])) return false;
294
+ $test = $this->selectStyle('', $this->formatSlug($style['style_slug']));
295
  if (!empty($test) and $test->id != $sid) // if style_slug is different then make sure it is unique
296
  return false;
297
+ $style['style_slug'] = $this->formatSlug($style['style_slug']);
298
+ foreach ($style as $key => $value)
299
+ $style[$key] = CustomContactFormsStatic::encodeOption($value);
300
+ $wpdb->update(CCF_STYLES_TABLE, $style, array('id' => $sid));
 
 
301
  return true;
302
  }
303
 
304
  function deleteForm($fid, $slug = NULL) {
305
  global $wpdb;
306
  $where_params = ($slug == NULL) ? "id='$fid'" : "form_slug='$slug'";
307
+ $wpdb->query("DELETE FROM " . CCF_FORMS_TABLE . ' WHERE ' . $where_params);
308
  return true;
309
  }
310
 
312
  global $wpdb;
313
  $this->dettachFieldAll($fid);
314
  $where_params = ($slug == NULL) ? "id='$fid'" : "field_slug='$slug'";
315
+ $wpdb->query("DELETE FROM " . CCF_FIELDS_TABLE . ' WHERE ' . $where_params);
316
  return false;
317
  }
318
 
319
+ function query($query) {
320
+ global $wpdb;
321
+ if (empty($query)) return false;
322
+ return ($wpdb->query($query) != false) ? $wpdb->insert_id : false;
323
+ }
324
+
325
  function deleteStyle($sid, $slug = NULL) {
326
  global $wpdb;
327
  $this->dettachStyleAll($sid);
328
  $where_params = ($slug == NULL) ? "id='$sid'" : "style_slug='$slug'";
329
+ $wpdb->query("DELETE FROM " . CCF_STYLES_TABLE . ' WHERE ' . $where_params);
330
  return true;
331
  }
332
 
334
  global $wpdb;
335
  $this->dettachFieldOptionAll($oid);
336
  $where_params = ($slug == NULL) ? "id='$oid'" : "option_slug='$slug'";
337
+ $wpdb->query("DELETE FROM " . CCF_FIELD_OPTIONS_TABLE . ' WHERE ' . $where_params);
338
  return true;
339
  }
340
 
341
+ function deleteUserData($uid) {
342
+ global $wpdb;
343
+ $wpdb->query("DELETE FROM " . CCF_USER_DATA_TABLE . " WHERE id='$uid'");
344
+ return true;
345
+ }
346
+
347
+ function selectAllFromTable($table, $output_type = OBJECT) {
348
+ global $wpdb;
349
+ return $wpdb->get_results('SELECT * FROM ' . $table, $output_type);
350
+ }
351
+
352
  function selectAllForms() {
353
  global $wpdb;
354
+ return $wpdb->get_results("SELECT * FROM " . CCF_FORMS_TABLE . " ORDER BY form_slug ASC");
355
  }
356
 
357
  function selectAllFields() {
358
  global $wpdb;
359
+ return $wpdb->get_results("SELECT * FROM " . CCF_FIELDS_TABLE . " ORDER BY field_slug ASC");
360
  }
361
 
362
  function selectAllFieldOptions() {
363
  global $wpdb;
364
+ return $wpdb->get_results("SELECT * FROM " . CCF_FIELD_OPTIONS_TABLE . " ORDER BY option_slug ASC");
365
  }
366
 
367
  function selectAllStyles() {
368
  global $wpdb;
369
+ return $wpdb->get_results("SELECT * FROM " . CCF_STYLES_TABLE . " ORDER BY style_slug ASC");
370
+ }
371
+
372
+ function selectAllUserData() {
373
+ global $wpdb;
374
+ return $wpdb->get_results("SELECT * FROM " . CCF_USER_DATA_TABLE . " ORDER BY data_time DESC");
375
  }
376
 
377
  function selectForm($fid, $form_slug = '') {
378
  global $wpdb;
379
  $extra = (!empty($form_slug)) ? " or form_slug = '$form_slug'" : '';
380
+ return $wpdb->get_row("SELECT * FROM " . CCF_FORMS_TABLE . " WHERE id='$fid' $extra");
381
  }
382
 
383
  function selectStyle($sid, $style_slug = '') {
384
  global $wpdb;
385
  $extra = (!empty($style_slug)) ? " or style_slug = '$style_slug'" : '';
386
+ return $wpdb->get_row("SELECT * FROM " . CCF_STYLES_TABLE . " WHERE id='$sid' $extra");
387
  }
388
 
389
  function selectField($fid, $field_slug = '') {
390
  global $wpdb;
391
  $extra = (!empty($field_slug)) ? " or field_slug = '$field_slug'" : '';
392
+ return $wpdb->get_row("SELECT * FROM " . CCF_FIELDS_TABLE . " WHERE id='$fid'" . $extra);
393
  }
394
 
395
  function selectFieldOption($oid, $option_slug = '') {
396
  global $wpdb;
397
  $extra = (!empty($option_slug)) ? " or option_slug = '$option_slug'" : '';
398
+ return $wpdb->get_row("SELECT * FROM " . CCF_FIELD_OPTIONS_TABLE . " WHERE id='$oid'" . $extra);
399
+ }
400
+
401
+ function selectUserData($uid) {
402
+ global $wpdb;
403
+ return $wpdb->get_row("SELECT * FROM " . CCF_USER_DATA_TABLE . " WHERE id='$uid'");
404
  }
405
 
406
  function addFieldToForm($field_id, $form_id) {
407
+ $field = $this->selectField($field_id);
408
+ if (empty($field)) return false;
409
+ $form = $this->selectForm($form_id);
410
+ if (empty($form)) return false;
411
  $fields = $this->getAttachedFieldsArray($form_id);
412
  if (!in_array($field_id, $fields)) {
413
  $new_fields = $form->form_fields . $field_id . ',';
418
  }
419
 
420
  function addFieldOptionToField($option_id, $field_id) {
421
+ $option = $this->selectFieldOption($option_id);
422
+ if (empty($option)) return false;
423
  $field = $this->selectField($field_id);
424
+ if (empty($field)) return false;
425
  $options = $this->getAttachedFieldOptionsArray($field_id);
426
  if (!in_array($option_id, $options)) {
427
  $new_options = $field->field_options . $option_id . ',';
455
  }
456
  return false;
457
  }
458
+
459
+ function dettachFieldOption($option_id, $field_id) {
460
+ $options = $this->getAttachedFieldOptionsArray($field_id);
461
+ if (!empty($options) && in_array($option_id, $options)) {
462
+ $field = $this->selectField($field_id);
463
+ $new_options = str_replace($option_id . ',', '', $field->field_options);
464
+ $this->updateField(array('field_options' => $new_options), $field_id);
465
+ return true;
466
+ }
467
+ return false;
468
+ }
469
+
470
  function dettachFieldAll($field_id) {
471
  $forms = $this->selectAllForms();
472
  foreach ($forms as $form)
479
  $this->dettachFieldOption($option_id, $field->id);
480
  }
481
 
 
 
 
 
 
 
 
 
 
 
 
482
  function dettachStyleAll($style_id) {
483
  $forms = $this->selectAllForms();
484
  foreach ($forms as $form) {
513
  return (!empty($test));
514
  }
515
 
516
+ function insertUserData($data_object) {
517
+ global $wpdb;
518
+ $wpdb->insert(CCF_USER_DATA_TABLE, array('data_time' => $data_object->getDataTime(), 'data_formid' => $data_object->getFormID(), 'data_formpage' => $data_object->getFormPage(), 'data_value' => $data_object->getEncodedData()));
519
+ return $wpdb->insert_id;
520
+ }
521
+
522
+ function emptyAllTables() {
523
+ $fields = $this->selectAllFields();
524
+ $forms = $this->selectAllForms();
525
+ $user_data = $this->selectAllUserData();
526
+ $styles = $this->selectAllStyles();
527
+ $options = $this->selectAllFieldOptions();
528
+ foreach ($fields as $field) $this->deleteField($field->id);
529
+ foreach ($forms as $form) $this->deleteForm($form->id);
530
+ foreach ($user_data as $data) $this->deleteUserData($data->id);
531
+ foreach ($styles as $style) $this->deleteStyle($style->id);
532
+ foreach ($options as $option) $this->deleteFieldOption($option->id);
533
+ }
534
+
535
  function insertDefaultContent($overwrite = false) {
536
  $field_slugs = array('name' => 'ccf_name', 'message' => 'ccf_message',
537
  'website' => 'ccf_website', 'phone' => 'ccf_phone', 'google' => 'ccf_google',
543
  foreach($option_slugs as $slug) $this->deleteFieldOption(0, $slug);
544
  foreach($form_slugs as $slug) $this->deleteForm(0, $slug);
545
  }
546
+ $name_field = array('field_slug' => $field_slugs['name'], 'field_label' => __('Your Name:', 'custom-contact-forms'),
547
+ 'field_required' => 1, 'field_instructions' => __('Please enter your full name.', 'custom-contact-forms'),
548
  'field_maxlength' => '100', 'field_type' => 'Text');
549
+ $message_field = array('field_slug' => $field_slugs['message'], 'field_label' => __('Your Message:', 'custom-contact-forms'),
550
+ 'field_required' => 0, 'field_instructions' => __('Enter any message or comment.', 'custom-contact-forms'),
551
  'field_maxlength' => 0, 'field_type' => 'Textarea');
552
+ $website_field = array('field_slug' => $field_slugs['website'], 'field_label' => __('Your Website:', 'custom-contact-forms'),
553
+ 'field_required' => 0, 'field_instructions' => __('If you have a website, please enter it here.', 'custom-contact-forms'),
554
  'field_maxlength' => 200, 'field_type' => 'Text');
555
+ $phone_field = array('field_slug' => $field_slugs['phone'], 'field_label' => __('Your Phone Number:', 'custom-contact-forms'),
556
+ 'field_required' => 0, 'field_instructions' => __('Please enter your phone number.', 'custom-contact-forms'),
557
  'field_maxlength' => 30, 'field_type' => 'Text');
558
+ $google_field = array('field_slug' => $field_slugs['google'], 'field_label' => __('Did you find my website through Google?', 'custom-contact-forms'),
559
+ 'field_required' => 0, 'field_instructions' => __('If you found my website through Google, check this box.', 'custom-contact-forms'),
560
+ 'field_maxlength' => 0, 'field_type' => 'Checkbox', 'field_value' => __('Yes', 'custom-contact-forms'));
561
+ $contact_method_field = array('field_slug' => $field_slugs['contact_method'], 'field_label' => __('How should we contact you?', 'custom-contact-forms'),
562
+ 'field_required' => 1, 'field_instructions' => __('By which method we should contact you?', 'custom-contact-forms'),
563
  'field_maxlength' => 0, 'field_type' => 'Dropdown');
564
  $email_field = $this->selectField(0, 'fixedEmail');
565
  $captcha_field = $this->selectField(0, 'captcha');
566
+ $email_option = array('option_slug' => $option_slugs['email'], 'option_label' => __('By Email', 'custom-contact-forms'));
567
+ $phone_option = array('option_slug' => $option_slugs['phone'], 'option_label' => __('By Phone', 'custom-contact-forms'));
568
+ $nocontact_option = array('option_slug' => $option_slugs['nocontact'], 'option_label' => __('Do Not Contact Me', 'custom-contact-forms'));
569
+ $contact_form = array('form_slug' => $form_slugs['contact_form'], 'form_title' => __('Contact Form', 'custom-contact-forms'), 'form_method' => 'Post',
570
+ 'submit_button_text' => __('Send Message', 'custom-contact-forms'), 'form_email' => get_option('admin_email'), 'form_success_message' => __('Thank you for filling out our contact form. We will contact you very soon by the way you specified.', 'custom-contact-forms'),
571
+ 'form_success_title' => __('Thank You!', 'custom-contact-forms'), 'form_style' => 0);
572
  $name_field_id = $this->insertField($name_field);
573
  $message_field_id = $this->insertField($message_field);
574
  $website_field_id = $this->insertField($website_field);
custom-contact-forms-export.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Custom Contact Forms Plugin
4
+ By Taylor Lovett - http://www.taylorlovett.com
5
+ Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
+ */
7
+ class CustomContactFormsExport extends CustomContactFormsDB {
8
+
9
+ var $last_export_content;
10
+ var $last_export_file;
11
+ var $exports_path;
12
+ var $option_name;
13
+
14
+ function CustomContactFormsExport($option_name) {
15
+ $this->exports_path = CCF_BASE_PATH . 'export/';
16
+ $this->option_name = $option_name;
17
+ }
18
+
19
+ function exportAll($backup_options = true) {
20
+ $out = '';
21
+ foreach ($GLOBALS['ccf_tables_array'] as $table)
22
+ $out .= $this->exportTable($table);
23
+ if ($backup_options) {
24
+ $out .= "\n" . $this->generateOptionsUpdateQuery() . "\n";
25
+ }
26
+ $this->last_export_content = $out;
27
+ return $out;
28
+ }
29
+
30
+ function exportTable($table) {
31
+ $out = '';
32
+ $data = parent::selectAllFromTable($table, ARRAY_A);
33
+ foreach ($data as $row) {
34
+ $no_insert = 0;
35
+ $cols = '';
36
+ $vals = '';
37
+ foreach ($row as $k => $v) {
38
+ $v = str_replace(';', '\;', $v);
39
+ $cols .= "$k, ";
40
+ $vals .= "'$v', ";
41
+ }
42
+ $vals = substr($vals, 0, strlen($vals) - 2);
43
+ $cols = substr($cols, 0, strlen($cols) - 2);
44
+ $statement = 'INSERT INTO `' . $table . '` (' . $cols . ') VALUES (' . CustomContactFormsStatic::escapeSemiColons($vals) . ');';
45
+ $statement = $statement . "\n\n";
46
+ $out .= $statement;
47
+ }
48
+ return $out;
49
+ }
50
+
51
+ function exportToFile($export_content = NULL) {
52
+ if ($export_content == NULL) $export_content = $this->getLastExportContent();
53
+ $export_file = "ccf-export-" . strtolower(date('j-M-Y--h-i-s')) . '.sql';
54
+ if (($export_handle = @fopen($this->getExportsPath() . $export_file, 'w')) == false)
55
+ return false;
56
+ $comment = '## ' . __('Custom Contact Forms Export File', 'custom-contact-forms') . "\n";
57
+ $comment .= '## '. __('It is recommended that you do not edit this file. The order of the', 'custom-contact-forms') . "\n";
58
+ $comment .= '## ' . __('queries is important if you intend to use this file through the CCF', 'custom-contact-forms') . "\n";
59
+ $comment .= '## ' . __('exporter. The query to update general settings MUST be the last query', 'custom-contact-forms') . "\n";
60
+ $comment .= '## ' . __('in this file.', 'custom-contact-forms') . "\n\n";
61
+ fwrite($export_handle, $comment . $export_content);
62
+ fclose($export_handle);
63
+ $this->last_export_file = $export_file;
64
+ return $export_file;
65
+ }
66
+
67
+ function getExportsPath() {
68
+ return $this->exports_path;
69
+ }
70
+
71
+ function getLastExportContent() {
72
+ return $this->last_export_content;
73
+ }
74
+
75
+ function importFromFile($file, $settings = array('mode' => 'clear_import', 'import_general_settings' => false, 'import_forms' => true,'import_fields' => true, 'import_field_options' => true, 'import_styles' => true, 'import_saved_submissions' => false)) {
76
+ $path = CCF_BASE_PATH. 'import/';
77
+ $file_name = basename(time() . $file['name']);
78
+ if (move_uploaded_file($file['tmp_name'], $path . $file_name)) {
79
+ $data = file_get_contents($path . $file_name);
80
+ $data = preg_replace('/^#.*?[\n\r]*$/ims', '', $data);
81
+ $commands = $this->parseMultiQuery($data);
82
+ $errors = 0;
83
+ if ($settings['mode'] == 'clear_import') parent::emptyAllTables();
84
+ foreach($commands as $command) {
85
+ if (preg_match('/^[\s]*UPDATE/is', $command)) {
86
+ if ($settings['import_general_settings'])
87
+ if (!parent::query($command)) $errors++;
88
+ } elseif (preg_match('/^[\s]*INSERT INTO/is', $command)) {
89
+ $table_name = $this->extractTableFromQuery($command);
90
+ $no_query = 0;
91
+ if ($settings['import_forms'] == 0) if ($table_name == CCF_FORMS_TABLE) $no_query = 1;
92
+ if ($settings['import_fields'] == 0) if ($table_name == CCF_FIELDS_TABLE) $no_query = 1;
93
+ if ($settings['import_field_options'] == 0) if ($table_name == CCF_FIELD_OPTIONS_TABLE) $no_query = 1;
94
+ if ($settings['import_styles'] == 0) if ($table_name == CCF_STYLES_TABLE) $no_query = 1;
95
+ if ($settings['import_saved_submissions'] == 0) if ($table_name == CCF_USER_DATA_TABLE) $no_query = 1;
96
+ if ($no_query == 0)
97
+ if (!parent::query($command)) $errors++;
98
+ }
99
+ }
100
+ return ($errors == 0) ? true : $errors;
101
+ }
102
+ return false;
103
+ }
104
+
105
+ function parseMultiQuery($sql, $unescape_semicolons = true, $replace_table_prefix = true) {
106
+ if (empty($sql)) return false;
107
+ $prefix = CustomContactFormsStatic::getWPTablePrefix();
108
+ $commands = preg_split('/\);[\n\r]*/ims', $sql);
109
+ foreach ($commands as $k => $v) {
110
+ if (preg_match('/^[\s]*INSERT INTO/is', $v)) $commands[$k] = $v . ')';
111
+ if ($unescape_semicolons)
112
+ $commands[$k] = CustomContactFormsStatic::unescapeSemiColons($commands[$k]);
113
+ if ($replace_table_prefix)
114
+ $commands[$k] = preg_replace('/^([a-zA-Z0-9 \s]+?)`.+?customcontactforms_(.+?)`/is', '$1 `' . $prefix . 'customcontactforms_$2`', $commands[$k]);
115
+ }
116
+ return $commands;
117
+ }
118
+
119
+ function generateOptionsUpdateQuery($option_name = NULL) {
120
+ if ($option_name == NULL) $option_name = $this->option_name;
121
+ $prefix = CustomContactFormsStatic::getWPTablePrefix();
122
+ $options = serialize(get_option($option_name));
123
+ return 'UPDATE `' . $prefix . "options` SET `option_value`='$options' WHERE `option_name`='$option_name';";
124
+ }
125
+
126
+ function extractTableFromQuery($query) {
127
+ return preg_replace('/^[\s]*?INSERT INTO[\s]*?`(.*?)`.*/is', '$1', $query);
128
+ }
129
+ }
130
+ ?>
custom-contact-forms-mailer.php CHANGED
@@ -24,12 +24,12 @@ if (!class_exists('CustomContactFormsMailer')) {
24
  }
25
 
26
  function send(){
27
- $reply = ($this->reply_to != NULL) ? $this->reply_to : $this->from;
28
  $this->addHeader('From: '.$this->from."\r\n");
29
  $this->addHeader('Reply-To: '.$reply."\r\n");
30
  $this->addHeader('Return-Path: '.$this->from."\r\n");
31
  $this->addHeader('X-mailer: ZFmail 1.0'."\r\n");
32
- $this->body .= "\n\n\n----------\nSent by Custom Contact Forms\nA WordPress Plugin created by Taylor Lovett\nReport a Bug/Get Support: http://www.taylorlovett.com\n";
33
  if ($this->wp_mail_function == 1)
34
  wp_mail($this->to, $this->subject, $this->body, $this->headers);
35
  else
24
  }
25
 
26
  function send(){
27
+ $reply = ($this->reply_to != NULL) ? $this->reply_to : $this->from;
28
  $this->addHeader('From: '.$this->from."\r\n");
29
  $this->addHeader('Reply-To: '.$reply."\r\n");
30
  $this->addHeader('Return-Path: '.$this->from."\r\n");
31
  $this->addHeader('X-mailer: ZFmail 1.0'."\r\n");
32
+ $this->body .= "\n\n\n----------\n" . __("Sent by Custom Contact Forms\nA WordPress Plugin created by Taylor Lovett", 'custom-contact-forms') . "\n".__('Report a Bug/Get Support:', 'custom-contact-forms')." http://www.taylorlovett.com\n";
33
  if ($this->wp_mail_function == 1)
34
  wp_mail($this->to, $this->subject, $this->body, $this->headers);
35
  else
custom-contact-forms-popover.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- require_once('custom-contact-forms.php');
3
- $customcontact = new CustomContactForms();
4
- ?>
5
- <html>
6
- <body>
7
- test
8
- </body>
9
- </html>
 
 
 
 
 
 
 
 
 
custom-contact-forms-static.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Custom Contact Forms Plugin
4
+ By Taylor Lovett - http://www.taylorlovett.com
5
+ Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
+ */
7
+ if (!class_exists('CustomContactFormsStatic')) {
8
+ class CustomContactFormsStatic {
9
+ function encodeOption($option) {
10
+ return htmlspecialchars(stripslashes($option), ENT_QUOTES);
11
+ }
12
+
13
+ function getWPTablePrefix() {
14
+ global $wpdb;
15
+ return $wpdb->prefix;
16
+ }
17
+
18
+ function encodeOptionArray($option_array) {
19
+ foreach ($option_array as $option) {
20
+ if (is_array($option))
21
+ $option = CustomContactFormsStatic::encodeOptionArray($option);
22
+ else
23
+ $option = CustomContactFormsStatic::encodeOption($option);
24
+ }
25
+ return $option_array;
26
+ }
27
+
28
+ function decodeOption($option, $strip_slashes = 1, $decode_html_chars = 1) {
29
+ if ($strip_slashes == 1) $option = stripslashes($option);
30
+ if ($decode_html_chars == 1) $option = html_entity_decode($option);
31
+ return $option;
32
+ }
33
+
34
+ function strstrb($h, $n){
35
+ return array_shift(explode($n, $h, 2));
36
+ }
37
+
38
+ function definePluginConstants() {
39
+ $prefix = CustomContactFormsStatic::getWPTablePrefix();
40
+ define('CCF_FORMS_TABLE', $prefix . 'customcontactforms_forms');
41
+ define('CCF_FIELDS_TABLE', $prefix . 'customcontactforms_fields');
42
+ define('CCF_STYLES_TABLE', $prefix . 'customcontactforms_styles');
43
+ define('CCF_USER_DATA_TABLE', $prefix . 'customcontactforms_user_data');
44
+ define('CCF_FIELD_OPTIONS_TABLE', $prefix . 'customcontactforms_field_options');
45
+ define('CCF_BASE_PATH', ABSPATH . 'wp-content/plugins/custom-contact-forms/');
46
+ $GLOBALS['ccf_tables_array'] = array(CCF_FORMS_TABLE, CCF_FIELDS_TABLE, CCF_STYLES_TABLE, CCF_USER_DATA_TABLE, CCF_FIELD_OPTIONS_TABLE);
47
+ $GLOBALS['ccf_fixed_fields'] = array('customcontactforms_submit' => '',
48
+ 'fid' => '',
49
+ 'fixedEmail' => __('Use this field if you want the plugin to throw an error on fake emails.', 'custom-contact-forms'),
50
+ 'form_page' => '',
51
+ 'captcha' => __('This field requires users to type numbers in an image preventing spam.', 'custom-contact-forms'),
52
+ 'ishuman' => __("This field requires users to check a box to prove they aren't a spam bot.", 'custom-contact-forms'),
53
+ 'resetButton' => __('This field lets users reset all form fields to their initial values. This will be inserted next to the submit button.', 'custom-contact-forms')
54
+ );
55
+ }
56
+
57
+ function escapeSemiColons($value) {
58
+ return str_replace(';', '\;', $value);
59
+ }
60
+
61
+ function unescapeSemiColons($value) {
62
+ return str_replace('\;', ';', $value);
63
+ }
64
+ }
65
+ }
66
+ ?>
custom-contact-forms-usage-popover.php ADDED
@@ -0,0 +1,326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="ccf-usage-popover">
2
+ <div class="popover-header">
3
+ <h5><?php _e('How To Use Custom Contact Forms', 'custom-contact-forms'); ?></h5>
4
+ <a href="javascript:void(0)" class="close">&times;</a> </div>
5
+ <div class="popover-body">
6
+ <ul id="popover-tof">
7
+ <li><a href="#pop-forms">
8
+ <?php _e('Forms', 'custom-contact-forms'); ?>
9
+ </a></li>
10
+ <li><a href="#pop-fields">
11
+ <?php _e('Fields', 'custom-contact-forms'); ?>
12
+ </a></li>
13
+ <li><a href="#pop-field-options">
14
+ <?php _e('Field Options', 'custom-contact-forms'); ?>
15
+ </a></li>
16
+ <li><a href="#pop-styles">
17
+ <?php _e('Styles', 'custom-contact-forms'); ?>
18
+ </a></li>
19
+ <li><a href="#pop-custom-html">
20
+ <?php _e('Custom HTML Forms', 'custom-contact-forms'); ?>
21
+ </a></li>
22
+ <li><a href="#pop-import-export">
23
+ <?php _e('Import/Export', 'custom-contact-forms'); ?>
24
+ </a></li>
25
+ <li><a href="#pop-form-submissions">
26
+ <?php _e('Form Submissions', 'custom-contact-forms'); ?>
27
+ </a></li>
28
+ </ul>
29
+ <h3>
30
+ <?php _e('Introduction', 'custom-contact-forms'); ?>
31
+ </h3>
32
+ <p>
33
+ <?php _e("CCF is an extremely intuitive plugin allowing you to create any type of contact form you can imagine. CCF is very user friendly but with possibilities comes complexity. It is recommend that you click the button below to create default fields, field options, and forms.
34
+ The default content will help you get a feel for the amazing things you can accomplish with this plugin. This popover only shows automatically the first time you visit the admin page;", 'custom-contact-forms'); ?>
35
+ <b>
36
+ <?php _e("if you want to view this popover again, click the 'Show Plugin Usage Popover'", 'custom-contact-forms'); ?>
37
+ </b>
38
+ <?php _e("in the instruction area of the admin page.", 'custom-contact-forms'); ?>
39
+ </p>
40
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
41
+ <input type="submit" class="insert-default-content-button" value="<?php _e("Insert Default Content", 'custom-contact-forms'); ?>" name="insert_default_content" />
42
+ </form>
43
+ <p>
44
+ <?php _e("Below is a basic usage outline of the four pillars of this plugin: fields, field options, styles, and forms. Another useful part of the plugin is the 'Custom HTML Feature' which allows you to write the form HTML yourself using the plugin simply as a form processor; this is great if you are a web developer with HTML experience. Also explained below is the 'Saved Form Submissions' feature which displays all form submissions in the admin panel.", 'custom-contact-forms'); ?>
45
+ </p>
46
+ <ul>
47
+ <li>
48
+ <h3>
49
+ <?php _e("Fields", 'custom-contact-forms'); ?>
50
+ <a name="pop-fields"></a></h3>
51
+ <p>
52
+ <?php _e("Fields are the actual input boxes in which users enter their information. There are six types of fields that you can attach to your forms.!", 'custom-contact-forms'); ?>
53
+ </p>
54
+ <ul>
55
+ <li><span>
56
+ <?php _e("Text:", 'custom-contact-forms'); ?>
57
+ </span>
58
+ <div>
59
+ <input type="text" class="width200" value="<?php _e("This is a text field", 'custom-contact-forms'); ?>" />
60
+ </div>
61
+ </li>
62
+ <li><span>
63
+ <?php _e("Textarea:", 'custom-contact-forms'); ?>
64
+ </span>
65
+ <div>
66
+ <textarea class="width2000"><?php _e("This is a text field", 'custom-contact-forms'); ?></textarea>
67
+ </div>
68
+ </li>
69
+ <li><span>
70
+ <?php _e("Dropdown:", 'custom-contact-forms'); ?>
71
+ </span>
72
+ <div>
73
+ <select>
74
+ <option>
75
+ <?php _e("This is a dropdown field", 'custom-contact-forms'); ?>
76
+ </option>
77
+ <option>
78
+ <?php _e("Field Option 2!", 'custom-contact-forms'); ?>
79
+ </option>
80
+ <option>
81
+ <?php _e("Field Option 3!", 'custom-contact-forms'); ?>
82
+ </option>
83
+ <option>
84
+ <?php _e("Field Option 4!", 'custom-contact-forms'); ?>
85
+ </option>
86
+ <option>
87
+ <?php _e("Unlimited # of options allowed", 'custom-contact-forms'); ?>
88
+ </option>
89
+ </select>
90
+ </div>
91
+ </li>
92
+ <li><span>
93
+ <?php _e("Radio:", 'custom-contact-forms'); ?>
94
+ </span>
95
+ <div>
96
+ <input type="radio" selected="selected" />
97
+ <?php _e("A radio field", 'custom-contact-forms'); ?>
98
+ <input type="radio" selected="selected" />
99
+ <?php _e("Field Option 2", 'custom-contact-forms'); ?>
100
+ <input type="radio" selected="selected" />
101
+ <?php _e("Field Option 3", 'custom-contact-forms'); ?>
102
+ </div>
103
+ </li>
104
+ <li><span>
105
+ <?php _e("Checkbox:", 'custom-contact-forms'); ?>
106
+ </span>
107
+ <div>
108
+ <input type="checkbox" value="1" />
109
+ <?php _e("This is a checkbox field", 'custom-contact-forms'); ?>
110
+ </div>
111
+ </li>
112
+ <li><span>
113
+ <?php _e("(advanced) Hidden:", 'custom-contact-forms'); ?>
114
+ </span>
115
+ <?php _e("These fields are hidden (obviously), they allow you to pass hidden information within your forms. Great for using other form processors like Aweber or InfusionSoft.", 'custom-contact-forms'); ?>
116
+ </li>
117
+ </ul>
118
+ <p>
119
+ <?php _e("There are a variety of different options that you can use when creating a field,", 'custom-contact-forms'); ?>
120
+ <span class="red">*</span>
121
+ <?php _e("denotes something required:", 'custom-contact-forms'); ?>
122
+ </p>
123
+ <ul>
124
+ <li><span class="red">*</span> <span>
125
+ <?php _e("Slug:", 'custom-contact-forms'); ?>
126
+ </span>
127
+ <?php _e("A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.", 'custom-contact-forms'); ?>
128
+ </li>
129
+ <li><span>
130
+ <?php _e("Field Label:", 'custom-contact-forms'); ?>
131
+ </span>
132
+ <?php _e("The field label is displayed next to the field and is visible to the user.", 'custom-contact-forms'); ?>
133
+ </li>
134
+ <li><span class="red">*</span> <span>
135
+ <?php _e("Field Type:", 'custom-contact-forms'); ?>
136
+ </span>
137
+ <?php _e("The six field types you can choose from are explained above.", 'custom-contact-forms'); ?>
138
+ </li>
139
+ <li><span>
140
+ <?php _e("Initial Value:", 'custom-contact-forms'); ?>
141
+ </span>
142
+ <?php _e("This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox 'Are you human?', I would set the initial value to 'Yes'. If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the field option you would like initially selected (or just leave it blank and the first option attached will be selected).", 'custom-contact-forms'); ?>
143
+ </li>
144
+ <li><span>
145
+ <?php _e("Max Length:", 'custom-contact-forms'); ?>
146
+ </span>
147
+ <?php _e("This allows you to limit the amount of characters a user can enter in a field (does not apply to textareas as of version 3.5.5)", 'custom-contact-forms'); ?>
148
+ </li>
149
+ <li><span>
150
+ <?php _e("Required Field:", 'custom-contact-forms'); ?>
151
+ </span>
152
+ <?php _e("If a field is required and a user leaves it blank, the plugin will display an error message explaining the problem. The user will then have to go back and fill in the field properly.", 'custom-contact-forms'); ?>
153
+ </li>
154
+ <li><span>
155
+ <?php _e("Field Instructions:", 'custom-contact-forms'); ?>
156
+ </span>
157
+ <?php _e("If this is filled out, a stylish tooltip popover displaying this text will show when the field is selected. This will only work if JQuery is enabled in general options.", 'custom-contact-forms'); ?>
158
+ </li>
159
+ <li><span>
160
+ <?php _e("Field Options:", 'custom-contact-forms'); ?>
161
+ </span>
162
+ <?php _e("After you create a field, if it's field type is radio or dropdown, you can attach field options to the field. Field options are explained in the next section.", 'custom-contact-forms'); ?>
163
+ </li>
164
+ </ul>
165
+ <p>
166
+ <?php _e("The last important thing related to fields are <span>Fixed Fields</span>. Fixed Fields are special fields that come already created within the plugin such as the captcha spam blocker and email field. Fixed Fields do special things that you wouldn't be able to accomplish with normally; they cannot be deleted or created. If you use the fixedEmail field, as opposed to creating your own email field. the users email will be checked to make sure it is valid, if it isn't a form error will be displayed.", 'custom-contact-forms'); ?>
167
+ </p>
168
+ </li>
169
+ <li>
170
+ <h3>
171
+ <?php _e('Field Options', 'custom-contact-forms'); ?>
172
+ <a name="pop-field-options"></a></h3>
173
+ <p>
174
+ <?php _e("In the field section above, look at the radio or dropdown fields. See how they have multiple options within the field? Those are called Field Options. Field Options have their own manager. There are only three things you must fill in to create a field option.", 'custom-contact-forms'); ?>
175
+ </p>
176
+ <ul>
177
+ <li><span class="red">*</span> <span>
178
+ <?php _e("Slug:", 'custom-contact-forms'); ?>
179
+ </span>
180
+ <?php _e("Used to identify the field option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one'.", 'custom-contact-forms'); ?>
181
+ </li>
182
+ <li><span class="red">*</span> <span>
183
+ <?php _e("Option Label:", 'custom-contact-forms'); ?>
184
+ </span>
185
+ <?php _e("This is what is shown to the user in the dropdown or radio field.", 'custom-contact-forms'); ?>
186
+ </li>
187
+ <li><span>
188
+ <?php _e("Option Value:", 'custom-contact-forms'); ?>
189
+ </span>
190
+ <?php _e("This is the actual value of the option which isn't shown to the user. This can be the same thing as the label. An example pairing of label => value is: 'The color green' => 'green' or 'Yes' => '1'. The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually emailed to you and stored in the database. For dropdown fields the option value is optional, <span>for radio fields it is required</span>.", 'custom-contact-forms'); ?>
191
+ </li>
192
+ </ul>
193
+ <p>
194
+ <?php _e("Once you create field options, you can attach them (in the field manager) to radio and dropdown fields (that are already created). It is important to remember that after you create a dropdown or radio field, they will not work until you attach one or more field options.", 'custom-contact-forms'); ?>
195
+ </p>
196
+ </li>
197
+ <li>
198
+ <h3>
199
+ <?php _e('Forms', 'custom-contact-forms'); ?>
200
+ <a name="pop-forms"></a></h3>
201
+ <p>
202
+ <?php _e("Forms bring everything together. Each form you create in the form manager shows a code to display that form in posts/pages as well as theme files. The post/page form display code looks like: [customcontact id=FORMID]. There are a number of parameters that you can fill out when creating and managing each of your forms.", 'custom-contact-forms'); ?>
203
+ </p>
204
+ <ul>
205
+ <li><span class="red">*</span> <span>
206
+ <?php _e("Slug:", 'custom-contact-forms'); ?>
207
+ </span>
208
+ <?php _e("A slug is simply a way to identify your form. It can only contain underscores, letters, and numbers and must be unique. Example 'my_contact_form'", 'custom-contact-forms'); ?>
209
+ </li>
210
+ <li><span>
211
+ <?php _e('Form Title:', 'custom-contact-forms'); ?>
212
+ </span>
213
+ <?php _e("The form title is heading text shown at the top of the form to users. Here's an example: 'My Contact Form'.", 'custom-contact-forms'); ?>
214
+ </li>
215
+ <li><span class="red">*</span> <span>
216
+ <?php _e('Form Method:', 'custom-contact-forms'); ?>
217
+ </span>
218
+ <?php _e("If you don't know what this is leave it as 'Post'. This allows you to change the way a form sends user information.", 'custom-contact-forms'); ?>
219
+ </li>
220
+ <li><span>
221
+ <?php _e('Form Action:', 'custom-contact-forms'); ?>
222
+ </span>
223
+ <?php _e("This allows you to process your forms using 3rd party services or your own scripts. If you don't know what this is, then leave it blank. This is useful if you use a service like Aweber or InfusionSoft.", 'custom-contact-forms'); ?>
224
+ </li>
225
+ <li><span>
226
+ <?php _e('Form Style:', 'custom-contact-forms'); ?>
227
+ </span>
228
+ <?php _e("This allows you to apply styles you create in the style manager to your forms. If you haven't created a custom style yet, just choose 'Default'.", 'custom-contact-forms'); ?>
229
+ </li>
230
+ <li><span>
231
+ <?php _e('Submit Button Text:', 'custom-contact-forms'); ?>
232
+ </span>
233
+ <?php _e("Here, you can specify the text that shows on the submit button.", 'custom-contact-forms'); ?>
234
+ </li>
235
+ <li><span>
236
+ <?php _e("Custom Code:", 'custom-contact-forms'); ?>
237
+ </span>
238
+ <?php _e("If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.", 'custom-contact-forms'); ?>
239
+ </li>
240
+ <li><span>
241
+ <?php _e('Form Destination Email:', 'custom-contact-forms'); ?>
242
+ </span>
243
+ <?php _e("Specify the email that should receive all form submissions. If you leave this blank it will revert to the default specified in general settings.", 'custom-contact-forms'); ?>
244
+ </li>
245
+ <li><span>
246
+ <?php _e('Form Success Message:', 'custom-contact-forms'); ?>
247
+ </span>
248
+ <?php _e("Will be displayed in a popover after the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
249
+ </li>
250
+ <li><span>
251
+ <?php _e('Form Success Message Title:', 'custom-contact-forms'); ?>
252
+ </span>
253
+ <?php _e("Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.", 'custom-contact-forms'); ?>
254
+ </li>
255
+ <li><span>
256
+ <?php _e('Custom Success URL:', 'custom-contact-forms'); ?>
257
+ </span>
258
+ <?php _e("If this is filled out, users will be sent to this page when they successfully fill out the form. If it is left blank, a popover showing the form's 'success message' will be displayed on successful form submission.", 'custom-contact-forms'); ?>
259
+ </li>
260
+ <li><span>
261
+ <?php _e('Attach Fields:', 'custom-contact-forms'); ?>
262
+ </span>
263
+ <?php _e("After creating a form you are given the option to attach (and dettach) fields to that specific form. Forms are useless until you attach fields.", 'custom-contact-forms'); ?>
264
+ </li>
265
+ </ul>
266
+ <p>
267
+ <?php _e("The form success message and success title apply to a popover that fades in after someone successfully completes a form (that does not have a custom success URL provided). The image below will help to give you a feel to how the popover will look and where the title and message actually show up.", 'custom-contact-forms'); ?>
268
+ </p>
269
+ <div class="ccf-success-popover-example"></div>
270
+ </li>
271
+ <li>
272
+ <h3>
273
+ <?php _e('Style Manager', 'custom-contact-forms'); ?>
274
+ <a name="pop-styles"></a></h3>
275
+ <p>
276
+ <?php _e("The style manager allows you to customize the appearance of forms without any knowledge of CSS. There are a ton of parameters you can fill out with each style and all of them are pretty self-explanitory. After you create a style, you need to go to the form manager and set the form style to the new style you created (the slug will be what shows in the 'Form Style' dropdown).", 'custom-contact-forms'); ?>
277
+ </p>
278
+ <p>
279
+ <?php _e("The image below will help you better understand how each style option will change your forms.", 'custom-contact-forms'); ?>
280
+ </p>
281
+ <div class="ccf-style-example"></div>
282
+ </li>
283
+ <li>
284
+ <h3>
285
+ <?php _e('Custom HTML Forms Feature (advanced)', 'custom-contact-forms'); ?>
286
+ <a name="pop-custom-html"></a></h3>
287
+ <p>
288
+ <?php _e("If you know HTML and simply want to use this plugin to process form requests, this feature is for you. The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following:", 'custom-contact-forms'); ?>
289
+ </p>
290
+ <ul>
291
+ <li>
292
+ <?php _e("Keep the form action/method the same (yes the action is supposed to be empty).", 'custom-contact-forms'); ?>
293
+ </li>
294
+ <li>
295
+ <?php _e("Include all the hidden fields shown below.", 'custom-contact-forms'); ?>
296
+ </li>
297
+ <li>
298
+ <?php _e("Provide a hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately).", 'custom-contact-forms'); ?>
299
+ </li>
300
+ </ul>
301
+ <p>
302
+ <?php _e("Just to be clear, you don't edit the code in the Custom HTML Forms feature within the admin panel. Instead, you copy the code in to the page, post, or theme file you want to display a form, then edit the code to look how you want following the guidelines provided above.", 'custom-contact-forms'); ?>
303
+ </p>
304
+ </li>
305
+ <li>
306
+ <h3>
307
+ <?php _e('Saved Form Submissions', 'custom-contact-forms'); ?>
308
+ <a name="pop-form-submissions"></a></h3>
309
+ <p>
310
+ <?php _e('This features saves each user form submission. All the fields attached to the form along with the time of submission and form URL are saved in the database and displayed in a stylish format in the admin panel.', 'custom-contact-forms'); ?>
311
+ </p>
312
+ </li>
313
+ <li>
314
+ <h3>
315
+ <?php _e('Import / Export', 'custom-contact-forms'); ?>
316
+ <a name="pop-import-export"></a></h3>
317
+ <p>
318
+ <?php _e('Import/export is a new feature that allows you to transfer forms, fields, field options, styles and everything else saved by the plugin between Wordpress installations. Clicking the Export All button will create a .SQL file for download. With the .SQL export file you can use the importer within the CCF plugin admin page to import the .SQL file. The built-in importer is completely safe as long as you only import files that have been generated by the CCF exporter.
319
+ You can also use PHPMyAdmin or any other MySQL database administration tool to run the import file. Importing a .SQL file will never overwrite any existing data.
320
+ It is strongly recommended that you import CCF .SQL files using the built-in importer with in the admin panel due to the added complexity of importing using alterative methods.
321
+ If you are importing without using the built-in importer (such as PHPMyAdmin), then note the following: You should only run the import file on Wordpress installations that already have Custom Contact Forms installed; also you will need to change the table prefix for each query within the .SQL file.', 'custom-contact-forms'); ?>
322
+ </p>
323
+ </li>
324
+ </ul>
325
+ </div>
326
+ </div>
custom-contact-forms-user-data.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Custom Contact Forms Plugin
4
+ By Taylor Lovett - http://www.taylorlovett.com
5
+ Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
+ */
7
+ if (!class_exists('CustomContactFormsUserData')) {
8
+ class CustomContactFormsUserData {
9
+ var $form_id = NULL;
10
+ var $data_time = NULL;
11
+ var $data_array = NULL;
12
+ var $encoded_data = NULL;
13
+ var $form_page = NULL;
14
+ function CustomContactFormsUserData($param_array) {
15
+ if (isset($param_array['form_id']))
16
+ $this->setFormID($param_array['form_id']);
17
+
18
+ if (isset($param_array['data_time']))
19
+ $this->setDataTime($param_array['data_time']);
20
+
21
+ if (isset($param_array['form_page']))
22
+ $this->setFormPage($param_array['form_page']);
23
+
24
+ if (isset($param_array['data_array'])) {
25
+ $this->setDataArray($param_array['data_array']);
26
+ $this->encodeData();
27
+ }
28
+
29
+ if (isset($param_array['encoded_data'])) {
30
+ $this->setEncodedData($param_array['encoded_data']);
31
+ $this->decodeData();
32
+ }
33
+ }
34
+
35
+ function encodeData() {
36
+ $data_array = $this->getDataArray();
37
+ $encoded_data = '';
38
+ foreach ($data_array as $key => $value) {
39
+ $key = CustomContactFormsStatic::encodeOption($key);
40
+ $value = CustomContactFormsStatic::encodeOption($value);
41
+ $encoded_data .= 's:'.strlen($key).':"'.$key.'";';
42
+ $encoded_data .= 's:'.strlen($value).':"'.$value.'";';
43
+ }
44
+ $this->setEncodedData($encoded_data);
45
+ }
46
+
47
+
48
+ function decodeData() {
49
+ $data = $this->getEncodedData();
50
+ $data_array = array();
51
+ while (!empty($data)) {
52
+ $key_length = CustomContactFormsStatic::strstrb($data, ':"');
53
+ $key_length = str_replace('s:', '', $key_length);
54
+ $piece_length = 6 + strlen($key_length) + (int) $key_length;
55
+ $key = substr($data, (4 + strlen($key_length)), (int) $key_length);
56
+ $data = substr($data, $piece_length);
57
+ $value_length = CustomContactFormsStatic::strstrb($data, ':"');
58
+ $value_length = str_replace('s:', '', $value_length);
59
+ $piece_length = 6 + strlen($value_length) + (int) $value_length;
60
+ $value = substr($data, (4 + strlen($value_length)), (int) $value_length);
61
+ $data = substr($data, $piece_length);
62
+ $data_array[$key] = $value;
63
+ }
64
+ $this->setDataArray($data_array);
65
+ }
66
+
67
+ /* Getters and Setters */
68
+ function setFormID($form_id) { $this->form_id = $form_id; }
69
+ function setFormPage($form_page) { $this->form_page = $form_page; }
70
+ function setDataTime($data_time) { $this->data_time = $data_time; }
71
+ function setDataArray($data_array) { $this->data_array = $data_array; }
72
+ function setEncodedData($encoded_data) { $this->encoded_data = $encoded_data; }
73
+ function getFormID() { return $this->form_id; }
74
+ function getFormPage() { return $this->form_page; }
75
+ function getDataTime() { return $this->data_time; }
76
+ function getDataArray() { return $this->data_array; }
77
+ function getEncodedData() { return $this->encoded_data; }
78
+
79
+ /* Debug function */
80
+
81
+ function printAll() {
82
+ ?><div style="margin-left:30px;">
83
+ <b>BEGIN User Data Object</b><br />
84
+ ---------------------------------<br />
85
+ Form ID: <?php echo $this->getFormID(); ?><br />
86
+ Form Page: <?php echo $this->getFormPage(); ?><br />
87
+ Data Time: <?php echo $this->getDataTime(); ?><br />
88
+ Data Array: <?php print_r($this->getDataArray()); ?><br />
89
+ Encoded Array: <?php print_r($this->getEncodedData()); ?><br />
90
+ ---------------------------------<br />
91
+ <b>END User Data Object</b></div>
92
+ <?php
93
+ }
94
+ }
95
+ }
96
+ ?>
custom-contact-forms-widget.php CHANGED
@@ -7,7 +7,7 @@
7
  if (!class_exists('CustomContactFormsWidget')) {
8
  class CustomContactFormsWidget extends WP_Widget {
9
  function CustomContactFormsWidget() {
10
- $widget_ops = array('description' => 'Add a customized contact form to your sidebar.');
11
  $this->WP_Widget('custom-contact-forms', 'Custom Contact Forms', $widget_ops);
12
  }
13
 
@@ -16,9 +16,9 @@ if (!class_exists('CustomContactFormsWidget')) {
16
  global $customcontact;
17
  $admin_option = $customcontact->getAdminOptions();
18
  $form_id = intval($instance['form_id']);
19
- if ((is_front_page() and $admin_option[show_widget_home] != 1) or (is_single() and $admin_option[show_widget_singles] != 1) or
20
- (is_page() and $admin_option[show_widget_pages] != 1) or (is_category() and $admin_option[show_widget_categories] != 1) or
21
- (is_archive() and $admin_option[show_widget_archives] != 1))
22
  return false;
23
  if (empty($form_id) or $form_id < 1) return false;
24
  extract($args);
@@ -29,7 +29,7 @@ if (!class_exists('CustomContactFormsWidget')) {
29
 
30
  function update($new_instance, $old_instance) {
31
  $instance = $old_instance;
32
- $instance[form_id] = $new_instance[form_id];
33
  return $instance;
34
  }
35
 
@@ -39,7 +39,7 @@ if (!class_exists('CustomContactFormsWidget')) {
39
  $form_id = esc_attr($instance['form_id']);
40
  ?>
41
  <p><label for="<?php echo $this->get_field_id('form_id'); ?>">
42
- Choose a Form:<br />
43
  <select id="<?php echo $this->get_field_id('form_id'); ?>" name="<?php echo $this->get_field_name('form_id'); ?>">
44
  <?php
45
  foreach ($forms as $form) {
@@ -50,7 +50,7 @@ if (!class_exists('CustomContactFormsWidget')) {
50
  ?>
51
  </select>
52
  </label></p>
53
- <p><a href="options-general.php?page=custom-contact-forms#create-forms">Create a Form</a></p>
54
  <?php
55
  }
56
  }
7
  if (!class_exists('CustomContactFormsWidget')) {
8
  class CustomContactFormsWidget extends WP_Widget {
9
  function CustomContactFormsWidget() {
10
+ $widget_ops = array('description' => __('Posted', 'Add a customized contact form to your sidebar.'));
11
  $this->WP_Widget('custom-contact-forms', 'Custom Contact Forms', $widget_ops);
12
  }
13
 
16
  global $customcontact;
17
  $admin_option = $customcontact->getAdminOptions();
18
  $form_id = intval($instance['form_id']);
19
+ if ((is_front_page() and $admin_option['show_widget_home'] != 1) or (is_single() and $admin_option['show_widget_singles'] != 1) or
20
+ (is_page() and $admin_option['show_widget_pages'] != 1) or (is_category() and $admin_option['show_widget_categories'] != 1) or
21
+ (is_archive() and $admin_option['show_widget_archives'] != 1))
22
  return false;
23
  if (empty($form_id) or $form_id < 1) return false;
24
  extract($args);
29
 
30
  function update($new_instance, $old_instance) {
31
  $instance = $old_instance;
32
+ $instance['form_id'] = $new_instance['form_id'];
33
  return $instance;
34
  }
35
 
39
  $form_id = esc_attr($instance['form_id']);
40
  ?>
41
  <p><label for="<?php echo $this->get_field_id('form_id'); ?>">
42
+ <?php _e('Choose a Form:', 'custom-contact-forms'); ?><br />
43
  <select id="<?php echo $this->get_field_id('form_id'); ?>" name="<?php echo $this->get_field_name('form_id'); ?>">
44
  <?php
45
  foreach ($forms as $form) {
50
  ?>
51
  </select>
52
  </label></p>
53
+ <p><a href="options-general.php?page=custom-contact-forms#create-forms"><?php _e('Create a Form', 'custom-contact-forms'); ?></a></p>
54
  <?php
55
  }
56
  }
custom-contact-forms.php CHANGED
@@ -2,13 +2,19 @@
2
  /*
3
  Plugin Name: Custom Contact Forms
4
  Plugin URI: http://taylorlovett.com/wordpress-plugins
5
- Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, captchas, tooltip popovers, unlimited fields/forms/form styles, use a custom thank you page or built-in popover with a custom success message set for each form. <a href="options-general.php?page=custom-contact-forms">Settings</a>
6
- Version: 3.5.10
7
  Author: Taylor Lovett
8
  Author URI: http://www.taylorlovett.com
9
  */
10
 
11
  /*
 
 
 
 
 
 
12
  Copyright (C) 2010-2011 Taylor Lovett, taylorlovett.com (admin@taylorlovett.com)
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License as published by
@@ -21,31 +27,31 @@
21
  You should have received a copy of the GNU General Public License
22
  along with this program. If not, see <http://www.gnu.org/licenses/>.
23
  */
 
 
 
24
  require_once('custom-contact-forms-db.php');
25
  if (!class_exists('CustomContactForms')) {
26
  class CustomContactForms extends CustomContactFormsDB {
27
  var $adminOptionsName = 'customContactFormsAdminOptions';
28
- var $version = '3.5.1';
29
- var $form_errors;
30
  var $error_return;
31
  var $current_form;
32
  var $current_thank_you_message;
33
- var $fixed_fields = array('customcontactforms_submit' => '',
34
- 'fid' => '',
35
- 'fixedEmail' => 'Use this field if you want the plugin to throw an error on fake emails.',
36
- 'form_page' => '',
37
- 'captcha' => 'This field requires users to type numbers in an image preventing spam.',
38
- 'ishuman' => 'This field requires users to check a box to prove they aren\'t a spam bot.'
39
- );
40
 
41
  function CustomContactForms() {
42
- parent::CustomContactFormsDB();
43
- $this->form_errors = array();
 
 
 
 
44
  }
45
 
46
  function activatePlugin() {
47
  $admin_options = $this->getAdminOptions();
48
- $admin_options[show_install_popover] = 1;
49
  update_option($this->adminOptionsName, $admin_options);
50
  parent::createTables();
51
  parent::updateTables();
@@ -54,9 +60,9 @@ if (!class_exists('CustomContactForms')) {
54
 
55
  function getAdminOptions() {
56
  $admin_email = get_option('admin_email');
57
- $customcontactAdminOptions = array('show_widget_home' => 1, 'show_widget_pages' => 1, 'show_widget_singles' => 1, 'show_widget_categories' => 1, 'show_widget_archives' => 1, 'default_to_email' => $admin_email, 'default_from_email' => $admin_email, 'default_form_subject' => 'Someone Filled Out Your Contact Form!',
58
- 'remember_field_values' => 0, 'author_link' => 1, 'enable_widget_tooltips' => 1, 'wp_mail_function' => 1, 'form_success_message_title' => 'Form Success!', 'form_success_message' => 'Thank you for filling out our web form. We will get back to you ASAP.', 'enable_jquery' => 1, 'code_type' => 'XHTML',
59
- 'show_install_popover' => 0); // default general settings
60
  $customcontactOptions = get_option($this->adminOptionsName);
61
  if (!empty($customcontactOptions)) {
62
  foreach ($customcontactOptions as $key => $option)
@@ -69,46 +75,92 @@ if (!class_exists('CustomContactForms')) {
69
  if (!is_admin()) {
70
  $this->startSession();
71
  $this->processForms();
 
 
 
72
  }
73
  }
74
 
75
- function insertFrontEndStyles() {
76
- if (!is_admin()) {
77
- wp_register_style('CCFStandardsCSS', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/css/custom-contact-forms-standards.css');
78
- wp_register_style('CCFFormsCSS', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/css/custom-contact-forms.css');
79
- wp_enqueue_style('CCFStandardsCSS');
80
- wp_enqueue_style('CCFFormsCSS');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
82
  }
83
 
 
 
 
 
 
 
 
84
  function insertBackEndStyles() {
85
- wp_register_style('CCFStandardsCSS', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/css/custom-contact-forms-standards.css');
86
- wp_register_style('CCFAdminCSS', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/css/custom-contact-forms-admin.css');
87
- wp_register_style('CCFColorPickerCSS', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/css/colorpicker.css');
88
  wp_enqueue_style('CCFStandardsCSS');
89
  wp_enqueue_style('CCFAdminCSS');
90
  wp_enqueue_style('CCFColorPickerCSS');
91
  }
92
 
93
  function insertAdminScripts() {
94
- wp_enqueue_script('ccf-main', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/custom-contact-forms-admin.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs'/*, 'jquery-ui-draggable', 'jquery-ui-resizable', 'jquery-ui-dialog'*/), '1.0');
95
- wp_enqueue_script('ccf-colorpicker', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/colorpicker.js');
96
- wp_enqueue_script('ccf-eye', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/eye.js');
97
- wp_enqueue_script('ccf-utils', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/utils.js');
98
- wp_enqueue_script('ccf-layout', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/layout.js?ver=1.0.2');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  }
100
 
101
  function insertFrontEndScripts() {
102
  if (!is_admin()) {
103
  $admin_options = $this->getAdminOptions();
104
- if ($admin_options[enable_jquery] == 1) {
105
  wp_enqueue_script('jquery');
106
- wp_enqueue_script('jquery-tools', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/jquery.tools.min.js');
107
- //wp_enqueue_script('jquery-ui-position', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/jquery.ui.position.js');
108
- //wp_enqueue_script('jquery-ui-widget', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/jquery.ui.widget.js');
109
- //wp_enqueue_script('jquery-bgiframe', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/jquery.bgiframe-2.1.1.js');
110
- wp_enqueue_script('ccf-main', get_option('siteurl') . '/wp-content/plugins/custom-contact-forms/js/custom-contact-forms.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-resizable'/*, 'jquery-ui-draggable', 'jquery-ui-dialog'*/), '1.0');
111
- //jquery-ui-position
112
  }
113
  }
114
  }
@@ -126,105 +178,13 @@ if (!class_exists('CustomContactForms')) {
126
  }
127
 
128
  function insertUsagePopover() {
129
- ?>
130
- <div id="ccf-usage-popover">
131
- <div class="popover-header">
132
- <h5>How to Use Custom Contact Forms</h5>
133
- <a href="javascript:void(0)" class="close">[close]</a>
134
- </div>
135
- <div class="popover-body">
136
- <p>CCF is an extremely intuitive plugin allowing you to create any type of contact form you can imagine. CCF is very user friendly but with possibilities comes complexity. It is recommend that you click the button below to create default fields, field options, and forms.
137
- The default content will help you get a feel for the amazing things you can accomplish with this plugin. This popover only shows automatically the first time you visit the admin page; <b>if you want to view this popover again, click the "Show Plugin Usage Popover"</b> in the instruction area of the admin page.</p>
138
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
139
- <input type="submit" class="insert-default-content-button" value="Insert Default Content" name="insert_default_content" />
140
- </form>
141
- <p>Below is a basic usage outline of the four pillars of this plugin: fields, field options, styles, and forms. Also explained below is the Custom HTML Feature which allows you to write the form HTML yourself using the plugin simply as a form processor; this is great if you are a web developer with HTML experience.</p>
142
- <ul>
143
- <li>
144
- <h3>Fields</h3>
145
- <p>Fields are the actual input boxes in which users enter their information. There are six types of fields that you can attach to your forms.</p>
146
- <ul>
147
- <li><span>Text:</span>
148
- <div><input type="text" class="width200" value="This is a text field" /></div></li>
149
- <li><span>Textarea:</span>
150
- <div><textarea class="width2000">This is a text field</textarea></div></li>
151
- <li><span>Dropdown:</span>
152
- <div><select><option>This is a dropdown field</option><option>Field Option 2!</option><option>Field Option 3!</option><option>Field Option 4!</option><option>Unlimited # of options allowed</option></select></div></li>
153
- <li><span>Radio:</span>
154
- <div><input type="radio" selected="selected" /> A radio field <input type="radio" selected="selected" /> Field Option 2 <input type="radio" selected="selected" /> Field Option 3</div></li>
155
- <li><span>Checkbox:</span>
156
- <div><input type="checkbox" value="1" /> This is a checkbox field</div></li>
157
- <li><span>(advanced) Hidden:</span> These fields are hidden (obviously), they allow you to pass hidden information within your forms. Great for using other form processors like Aweber or InfusionSoft.</li>
158
- </ul>
159
- <p>There are a variety of different options that you can use when creating a field, <span class="red">*</span> denotes something required:</p>
160
- <ul>
161
- <li><span class="red">*</span> <span>Slug:</span> A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.</li>
162
- <li><span>Field Label:</span> The field label is displayed next to the field and is visible to the user.</li>
163
- <li><span class="red">*</span> <span>Field Type:</span> The six field types you can choose from are explained above.</li>
164
- <li><span>Initial Value:</span> This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox "Are you human?", I would set the initial value to "Yes". If you set the field type as "Dropdown" or "Radio", you should enter the slug of the field option you would like initially selected (or just leave it blank and the first option attached will be selected).</li>
165
- <li><span>Max Length:</span> This allows you to limit the amount of characters a user can enter in a field (does not apply to textareas as of version 3.5.5)</li>
166
- <li><span>Required Field:</span> If a field is required and a user leaves it blank, the plugin will display an error message explaining the problem. The user will then have to go back and fill in the field properly.</li>
167
- <li><span>Field Instructions:</span> If this is filled out, a stylish tooltip popover displaying this text will show when the field is selected. This will only work if JQuery is enabled in general options.</li>
168
- <li><span>Field Options:</span> After you create a field, if it's field type is radio or dropdown, you can attach field options to the field. Field options are explained in the next section.
169
- </ul>
170
- <p>The last important thing related to fields are <span>Fixed Fields</span>. Fixed Fields are special fields that come already created within the plugin such as the captcha spam blocker and email field. Fixed Fields do special things that you wouldn't be able to accomplish with normally; they cannot be deleted or created. If you use the fixedEmail field, as opposed to creating your own email field. the users email will be checked to make sure it is valid, if it isn't a form error will be displayed.</p>
171
- </li>
172
- <li>
173
- <h3>Field Options</h3>
174
- <p>In the field section above, look at the radio or dropdown fields. See how they have multiple options within the field? Those are called Field Options. Field Options have their own manager. There are only three things you must fill in to create a field option.</p>
175
- <ul>
176
- <li><span class="red">*</span> <span>Slug:</span> Used to identify the field option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: "slug_one".</li>
177
- <li><span class="red">*</span> <span>Option Label:</span> This is what is shown to the user in the dropdown or radio field.</li>
178
- <li><span>Option Value:</span> This is the actual value of the option which isn't shown to the user. This can be the same thing as the label. An example pairing of label => value is: "The color green" => "green" or "Yes" => "1". The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually emailed to you and stored in the database. For dropdown fields the option value is optional, <span>for radio fields it is required</span>.</li>
179
- </ul>
180
- <p>Once you create field options, you can attach them (in the field manager) to radio and dropdown fields (that are already created). It is important to remember that after you create a dropdown or radio field, they will not work until you attach one or more field options.</p>
181
- </li>
182
- <li>
183
- <h3>Forms</h3>
184
- <p>Forms bring everything together. Each form you create in the form manager shows a code to display that form in posts/pages as well as theme files. The post/page form display code looks like: [customcontact id=FORMID]. There are a number of parameters that you can fill out when creating and managing each of your forms.</p>
185
- <ul>
186
- <li><span class="red">*</span> <span>Slug:</span> A slug is simply a way to identify your form. It can only contain underscores, letters, and numbers and must be unique. Example "my_contact_form"</li>
187
- <li><span>Form Title:</span> The form title is heading text shown at the top of the form to users. Here's an example: "My Contact Form".</li>
188
- <li><span class="red">*</span> <span>Form Method:</span> If you don't know what this is leave it as "Post". This allows you to change the way a form sends user information.</li>
189
- <li><span>Form Action:</span> This allows you to process your forms using 3rd party services or your own scripts. If you don't know what this is, then leave it blank. This is useful if you use a service like Aweber or InfusionSoft.</li>
190
- <li><span>Form Style:</span> This allows you to apply styles you create in the style manager to your forms. If you haven't created a custom style yet, just choose "Default".</li>
191
- <li><span>Submit Button Text:</span> Here, you can specify the text that shows on the submit button.</li>
192
- <li><span>Custom Code:</span> If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.</li>
193
- <li><span>Form Destination Email:</span> Specify the email that should receive all form submissions. If you leave this blank it will revert to the default specified in general settings.</li>
194
- <li><span>Form Success Message:</span> Will be displayed in a popover after the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.</li>
195
- <li><span>Form Success Message Title:</span> Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.</li>
196
- <li><span>Custom Success URL:</span> If this is filled out, users will be sent to this page when they successfully fill out the form. If it is left blank, a popover showing the form's "success message" will be displayed on successful form submission.</li>
197
- <li><span>Attach Fields:</span> After creating a form you are given the option to attach (and dettach) fields to that specific form. Forms are useless until you attach fields.</li>
198
- </ul>
199
- <p>The form success message and success title apply to a popover that fades in after someone successfully completes a form (that does not have a custom success URL provided). The image below will help to give you a feel to how the popover will look and where the title and message actually show up.</p>
200
- <div class="ccf-success-popover-example"></div>
201
- </li>
202
- <li>
203
- <h3>Style Manager</h3>
204
- <p>The style manager allows you to customize the appearance of forms without any knowledge of CSS. There are a ton of parameters you can fill out with each style and all of them are pretty self-explanitory. After you create a style, you need to go to the form manager and set the form style to the new style you created (the slug will be what shows in the "Form Style" dropdown).</p>
205
- <p>The image below will help you better understand how each style option will change your forms.</p>
206
- <div class="ccf-style-example"></div>
207
- </li>
208
- <li>
209
- <h3>Custom HTML Forms Feature (advanced)</h3>
210
- <p>If you know HTML and simply want to use this plugin to process form requests, this feature is for you. The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following:</p>
211
- <ul>
212
- <li>Keep the form action/method the same (yes the action is supposed to be empty).</li>
213
- <li>Include all the hidden fields shown below.</li>
214
- <li>Provide a hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately).</li>
215
- </ul>
216
- <p>Just to be clear, you don't edit the code in the Custom HTML Forms feature within the admin panel. Instead, you copy the code in to the page, post, or theme file you want to display a form, then edit the code to look how you want following the guidelines provided above.</p>
217
- </li>
218
- </ul>
219
- </div>
220
- </div>
221
- <?php
222
  }
223
 
224
  function printAdminPage() {
225
  $admin_options = $this->getAdminOptions();
226
- if ($admin_options[show_install_popover] == 1) {
227
- $admin_options[show_install_popover] = 0;
228
  ?>
229
  <script type="text/javascript" language="javascript">
230
  $j(document).ready(function() {
@@ -233,973 +193,155 @@ if (!class_exists('CustomContactForms')) {
233
  </script>
234
  <?php
235
  update_option($this->adminOptionsName, $admin_options);
236
- } if ($_POST[form_create]) {
237
- parent::insertForm($_POST[form]);
238
- } elseif ($_POST[field_create]) {
239
- parent::insertField($_POST[field]);
240
- } elseif ($_POST[general_settings]) {
241
- $admin_options[default_to_email] = $_POST[default_to_email];
242
- $admin_options[default_from_email] = $_POST[default_from_email];
243
- $admin_options[default_form_subject] = $_POST[default_form_subject];
244
- $admin_options[show_widget_categories] = $_POST[show_widget_categories];
245
- $admin_options[show_widget_singles] = $_POST[show_widget_singles];
246
- $admin_options[show_widget_pages] = $_POST[show_widget_pages];
247
- $admin_options[show_widget_archives] = $_POST[show_widget_archives];
248
- $admin_options[show_widget_home] = $_POST[show_widget_home];
249
- $admin_options[custom_thank_you] = $_POST[custom_thank_you];
250
- $admin_options[author_link] = $_POST[author_link];
251
- $admin_options[enable_jquery] = $_POST[enable_jquery];
252
- $admin_options[code_type] = $_POST[code_type];
253
- $admin_options[form_success_message] = $_POST[form_success_message];
254
- $admin_options[form_success_message_title] = $_POST[form_success_message_title];
255
- $admin_options[wp_mail_function] = $_POST[wp_mail_function];
256
- $admin_options[enable_widget_tooltips] = $_POST[enable_widget_tooltips];
257
- $admin_options[remember_field_values] = $_POST[remember_field_values];
 
 
258
  update_option($this->adminOptionsName, $admin_options);
259
- } elseif ($_POST[field_edit]) {
260
- parent::updateField($_POST[field], $_POST[fid]);
261
- } elseif ($_POST[field_delete]) {
262
- parent::deleteField($_POST[fid]);
263
- } elseif ($_POST[insert_default_content]) {
264
  parent::insertDefaultContent();
265
- } elseif ($_POST[form_delete]) {
266
- parent::deleteForm($_POST[fid]);
267
- } elseif ($_POST[form_edit]) {
268
- parent::updateForm($_POST[form], $_POST[fid]);
269
- } elseif ($_POST[form_add_field]) {
270
- parent::addFieldToForm($_POST[field_id], $_POST[fid]);
271
- } elseif ($_POST[attach_field_option]) {
272
- parent::addFieldOptionToField($_POST[attach_option_id], $_POST[fid]);
273
- } elseif ($_POST[dettach_field]) {
274
- parent::dettachField($_POST[dettach_field_id], $_POST[fid]);
275
- } elseif ($_POST[dettach_field_option]) {
276
- parent::dettachFieldOption($_POST[dettach_option_id], $_POST[fid]);
277
- } elseif ($_POST[style_create]) {
278
- parent::insertStyle($_POST[style]);
279
- } elseif ($_POST[style_edit]) {
280
- parent::updateStyle($_POST[style], $_POST[sid]);
281
- } elseif ($_POST[style_delete]) {
282
- parent::deleteStyle($_POST[sid]);
283
- } elseif ($_POST[contact_author]) {
284
  $this_url = (!empty($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : $_SERVER['SERVER_NAME'];
285
- $this->contactAuthor($_POST[name], $_POST[email], $this_url, $_POST[message], $_POST[type]);
286
- } elseif ($_POST[delete_field_option]) {
287
- parent::deleteFieldOption($_POST[oid]);
288
- } elseif ($_POST[edit_field_option]) {
289
- parent::updateFieldOption($_POST[option], $_POST[oid]);
290
- } elseif ($_POST[create_field_option]) {
291
- parent::insertFieldOption($_POST[option]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
292
  }
 
293
  $styles = parent::selectAllStyles();
294
  $style_options = '<option value="0">Default</option>';
295
  foreach ($styles as $style)
296
  $style_options .= '<option value="'.$style->id.'">'.$style->style_slug.'</option>';
297
- ?>
298
- <div id="customcontactforms-admin">
299
- <div id="icon-themes" class="icon32"></div>
300
- <h2>Custom Contact Forms</h2>
301
- <ul id="plugin-nav">
302
- <li><a href="#instructions">Plugin Instructions</a></li>
303
- <li><a href="#general-settings">General Settings</a></li>
304
- <li><a href="#create-fields">Create Fields</a></li>
305
- <li><a href="#create-forms">Create Forms</a></li>
306
- <li><a href="#manage-fields">Manage Fields</a></li>
307
- <li><a href="#manage-fixed-fields">Manage Fixed Fields</a></li>
308
- <li><a href="#manage-forms">Manage Forms</a></li>
309
- <li><a href="#create-styles">Create Styles</a></li>
310
- <li><a href="#manage-styles">Manage Styles</a></li>
311
- <li><a href="#manage-field-options">Manage Field Options</a></li>
312
- <li><a href="#contact-author">Suggest a Feature</a></li>
313
- <li><a href="#contact-author">Bug Report</a></li>
314
- <li><a href="#custom-html">Custom HTML Forms (New!)</a></li>
315
- <li class="last"><a href="#plugin-news">Plugin News</a></li>
316
- </ul>
317
- <a class="rate-me" href="http://wordpress.org/extend/plugins/custom-contact-forms" title="Rate This Plugin">We need your help to continue development! Please <span>rate this plugin</span> to show your support.</a>
318
-
319
- <a name="create-fields"></a>
320
- <div id="create-fields" class="postbox">
321
- <h3 class="hndle"><span>Create A Form Field</span></h3>
322
- <div class="inside">
323
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
324
- <ul>
325
- <li>
326
- <label for="field_slug">* Slug (Name):</label>
327
- <input name="field[field_slug]" type="text" maxlength="50" /><br />
328
- (A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.)</li>
329
- <li>
330
- <label for="field_label">Field Label:</label>
331
- <input name="field[field_label]" type="text" maxlength="100" /><br />
332
- (The field label is displayed next to the field and is visible to the user.)
333
- </li>
334
- <li>
335
- <label for="field_type">* Field Type:</label>
336
- <select name="field[field_type]">
337
- <option>Text</option>
338
- <option>Textarea</option>
339
- <option>Hidden</option>
340
- <option>Checkbox</option>
341
- <option>Radio</option>
342
- <option>Dropdown</option>
343
- </select>
344
- </li>
345
- <li>
346
- <label for="field_value">Initial Value:</label>
347
- <input name="field[field_value]" type="text" maxlength="50" /><br />
348
- (This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox
349
- "Are you human?", I would set the initial value to "Yes". If you set the field type as "Dropdown" or "Radio", you should enter the slug of the
350
- <a href="#manage-field-options" title="Create a Field Option">field option</a> you would like initially selected.)
351
- </li>
352
- <li>
353
- <label for="field_maxlength">Max Length:</label>
354
- <input class="width50" size="10" name="field[field_maxlength]" type="text" maxlength="4" />
355
- <br />(0 for no limit; only applies to Text fields)</li>
356
- <li>
357
- <label for="field_required">* Required Field:</label>
358
- <select name="field[field_required]"><option value="0">No</option><option value="1">Yes</option></select><br />
359
- (If a field is required and a user leaves it blank, the plugin will display an error message explainging the problem.)</li>
360
- <li>
361
- <label for="field_value">Field Instructions:</label>
362
- <input name="field[field_instructions]" type="text" /><br />
363
- (If this is filled out, a tooltip popover displaying this text will show when the field is selected.)
364
- </li>
365
- <li><input type="hidden" name="field[user_field]" value="1" />
366
- <input type="submit" value="Create Field" name="field_create" />
367
- </li>
368
- </ul>
369
- </form>
370
- </div>
371
- </div><a name="create-forms"></a>
372
- <div id="create-forms" class="postbox">
373
- <h3 class="hndle"><span>Create A Form</span></h3>
374
- <div class="inside">
375
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
376
- <ul>
377
- <li>
378
- <label for="form[form_slug]">* Form Slug:</label>
379
- <input type="text" maxlength="100" name="form[form_slug]" /><br />
380
- (Must be unique and contain only underscores and alphanumeric characters.)</li>
381
- <li>
382
- <label for="form[form_title]">Form Title:</label>
383
- <input type="text" maxlength="200" name="form[form_title]" />
384
- (The form header text)</li>
385
- <li>
386
- <label for="form[form_method]">* Form Method:</label>
387
- <select name="form[form_method]">
388
- <option>Post</option>
389
- <option>Get</option>
390
- </select>
391
- (If unsure, leave as is.)</li>
392
- <li>
393
- <label for="form[form_action]">Form Action:</label>
394
- <input type="text" name="form[form_action]" value="" /><br />
395
- (If unsure, leave blank. Enter a URL here, if and only if you want to process your forms somewhere else, for example with a service like Aweber or InfusionSoft.)</li>
396
- <li>
397
- <label for="form[form_action]">Form Style:</label>
398
- <select name="form[form_style]"><?php echo $style_options; ?></select>
399
- (<a href="#create-styles">Click to create a style</a>)</li>
400
- <li>
401
- <label for="form[submit_button_text]">Submit Button Text:</label>
402
- <input type="text" maxlength="200" name="form[submit_button_text]" />
403
- </li>
404
- <li>
405
- <label for="form[custom_code]">Custom Code:</label>
406
- <input type="text" name="form[custom_code]" /><br />
407
- (If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.)</li>
408
- <li>
409
- <label for="form[form_email]">Form Destination Email:</label>
410
- <input type="text" name="form[form_email]" /><br />
411
- (Will receive all submissions from this form; if left blank it will use the default specified in general settings.)</li>
412
- <li>
413
- <label for="form[form_success_message]">Form Success Message:</label>
414
- <input type="text" name="form[form_success_message]" /><br />
415
- (Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.)</li>
416
- <li>
417
- <label for="form[form_success_title]">Form Success Message Title:</label>
418
- <input type="text" name="form[form_success_title]" /><br />
419
- (Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.)</li>
420
- <li>
421
- <label for="form[form_thank_you_page]">Custom Success URL:</label>
422
- <input type="text" name="form[form_thank_you_page]" /><br />
423
- (If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's "success message" will be displayed on form success.)</li>
424
- <li>
425
- <input type="submit" value="Create Form" name="form_create" />
426
- </li>
427
- </ul>
428
- </form>
429
- </div>
430
- </div><a name="manage-fields"></a>
431
- <h3 class="manage-h3">Manage User Fields</h3>
432
- <table class="widefat post" id="manage-fields" cellspacing="0">
433
- <thead>
434
- <tr>
435
- <th scope="col" class="manage-column field-slug">Slug</th>
436
- <th scope="col" class="manage-column field-label">Label</th>
437
- <th scope="col" class="manage-column field-type">Type</th>
438
- <th scope="col" class="manage-column field-value">Initial Value</th>
439
- <th scope="col" class="manage-column field-required">Required</th>
440
- <th scope="col" class="manage-column field-maxlength">Maxlength</th>
441
- <th scope="col" class="manage-column field-action">Action</th>
442
- </tr>
443
- </thead>
444
- <tbody>
445
- <?php
446
- $fields = parent::selectAllFields();
447
- for ($i = 0, $z = 0; $i < count($fields); $i++, $z++) {
448
- if ($fields[$i]->user_field == 0) { $z--; continue; }
449
- $attached_options = parent::getAttachedFieldOptionsArray($fields[$i]->id);
450
- $field_types = '<option>Text</option><option>Textarea</option><option>Hidden</option><option>Checkbox</option><option>Radio</option><option>Dropdown</option>';
451
- $field_types = str_replace('<option>'.$fields[$i]->field_type.'</option>', '<option selected="selected">'.$fields[$i]->field_type.'</option>', $field_types);
452
-
453
- ?>
454
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
455
- <tr<?php if ($z % 2 == 1) echo ' class="evenrow"'; ?> style="border-bottom">
456
-
457
- <td><input type="text" name="field[field_slug]" class="width100" maxlength="50" value="<?php echo $fields[$i]->field_slug; ?>" /></td>
458
- <td><input type="text" name="field[field_label]" maxlength="100" value="<?php echo $fields[$i]->field_label; ?>" /></td>
459
- <td><select name="field[field_type]">
460
- <?php echo $field_types; ?>
461
- </select></td>
462
- <td><input type="text" name="field[field_value]" maxlength="50" class="width75" value="<?php echo $fields[$i]->field_value; ?>" /></td>
463
- <td><select name="field[field_required]"><option value="1">Yes</option><option value="0" <?php if ($fields[$i]->field_required != 1) echo 'selected="selected"'; ?>>No</option></select></td>
464
- <td>
465
- <?php if ($fields[$i]->field_type == 'Dropdown' || $fields[$i]->field_type == 'Radio') { ?>
466
- <b>-</b>
467
- <?php } else { ?>
468
- <input type="text" class="width50" name="field[field_maxlength]" value="<?php echo $fields[$i]->field_maxlength; ?>" />
469
- <?php } ?>
470
- </td>
471
- <td><input type="hidden" name="fid" value="<?php echo $fields[$i]->id; ?>" />
472
- <span class="fields-options-expand"></span>
473
- <input type="submit" name="field_edit" value="Save" />
474
- <input type="submit" name="field_delete" class="delete_button" value="Delete" /></td>
475
-
476
- </tr>
477
- <tr<?php if ($z % 2 == 1) echo ' class="evenrow"'; ?>>
478
- <td class="fields-extra-options" colspan="7" style="border-top:0; border-bottom:1px solid black;">
479
- <div class="field-instructions">
480
- <label for="field_instructions">Field Instructions:</label>
481
- <input type="text" class="width150" name="field[field_instructions]" value="<?php echo $fields[$i]->field_instructions; ?>" />
482
- </div>
483
- <?php
484
- if ($fields[$i]->field_type == 'Radio' || $fields[$i]->field_type == 'Dropdown') { ?>
485
- <div class="dettach-field-options">
486
- <?php if (empty($attached_options)) { ?>
487
- <b>No Attached Options</b>
488
- <?php } else { ?>
489
- <select name="dettach_option_id">
490
- <?php
491
- foreach ($attached_options as $option_id) {
492
- $option = parent::selectFieldOption($option_id);
493
- ?>
494
- <option value="<?php echo $option_id; ?>"><?php echo $option->option_slug; ?></option>
495
- <?php
496
- }
497
- ?>
498
- </select>
499
- <input type="submit" name="dettach_field_option" value="Dettach Field Option" />
500
- <?php } ?>
501
- <br /><span class="red bold">*</span> Dettach field options you <a href="#create-field-options">create</a>.
502
- </div>
503
- <?php $all_options = $this->getFieldOptionsForm(); ?>
504
- <div class="attach-field-options">
505
- <?php if (empty($all_options)) { ?>
506
- <b>No Field Options to Attach</b>
507
- <?php } else { ?>
508
- <select name="attach_option_id">
509
- <?php echo $all_options; ?>
510
- </select> <input type="submit" name="attach_field_option" value="Attach Field Option" />
511
- <?php } ?>
512
- <br /><span class="red bold">*</span> Attach field options in the order you want them to display.
513
- </div>
514
- <?php } ?>
515
- </td>
516
- </tr>
517
- </form>
518
- <?php
519
- }
520
- ?>
521
- </tbody>
522
- <tfoot>
523
- <tr>
524
- <th scope="col" class="manage-column field-slug">Slug</th>
525
- <th scope="col" class="manage-column field-label">Label</th>
526
- <th scope="col" class="manage-column field-type">Type</th>
527
- <th scope="col" class="manage-column field-value">Initial Value</th>
528
- <th scope="col" class="manage-column field-required">Required</th>
529
- <th scope="col" class="manage-column field-maxlength">Maxlength</th>
530
- <th scope="col" class="manage-column field-action">Action</th>
531
- </tr>
532
- </tfoot>
533
- </table><a name="manage-fixed-fields"></a>
534
- <h3 class="manage-h3">Manage Fixed Fields</h3>
535
- <table class="widefat post" id="manage-fixed-fields" cellspacing="0">
536
- <thead>
537
- <tr>
538
- <th scope="col" class="manage-column field-slug">Slug</th>
539
- <th scope="col" class="manage-column field-label">Label</th>
540
- <th scope="col" class="manage-column field-type">Type</th>
541
- <th scope="col" class="manage-column field-value">Initial Value</th>
542
- <th scope="col" class="manage-column field-value">Required</th>
543
- <th scope="col" class="manage-column field-maxlength">Maxlength</th>
544
- <th scope="col" class="manage-column field-action">Action</th>
545
- </tr>
546
- </thead>
547
- <tbody>
548
- <?php
549
- $fields = parent::selectAllFields();
550
- for ($i = 0, $z = 0; $i < count($fields); $i++, $z++) {
551
- if ($fields[$i]->user_field == 1) { $z--; continue;}
552
- $field_types = '<option>Text</option><option>Textarea</option><option>Hidden</option><option>Checkbox</option>';
553
- $field_types = str_replace('<option>'.$fields[$i]->field_type.'</option>', '<option selected="selected">'.$fields[$i]->field_type.'</option>', $field_types);
554
-
555
- ?>
556
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
557
- <tr <?php if ($z % 2 == 0) echo ' class="evenrow"'; ?> style="border:none;">
558
-
559
- <td><?php echo $fields[$i]->field_slug; ?></td>
560
- <td><input type="text" name="field[field_label]" maxlength="100" value="<?php echo $fields[$i]->field_label; ?>" /></td>
561
- <td><?php echo $fields[$i]->field_type; ?>
562
- <td><?php if ($fields[$i]->field_type != 'Checkbox') { ?>
563
- <input type="text" name="field[field_value]" class="width75" maxlength="50" value="<?php echo $fields[$i]->field_value; ?>" />
564
- <?php } else {
565
- echo $fields[$i]->field_value;
566
- ?>
567
- <?php } ?>
568
- </td>
569
- <td>
570
- <?php if ($fields[$i]->field_slug == 'fixedEmail') { ?>
571
- <select name="field[field_required]"><option value="1">Yes</option><option <?php if($fields[$i]->field_required != 1) echo 'selected="selected"'; ?> value="0">No</option></select>
572
- <?php } else { ?>
573
- Yes
574
- <?php } ?>
575
- </td>
576
- <td><?php if ($fields[$i]->field_type != 'Checkbox') { ?>
577
- <input type="text" class="width50" name="field[field_maxlength]" value="<?php echo $fields[$i]->field_maxlength; ?>" />
578
- <?php } else { ?>
579
- None
580
- <?php } ?>
581
- </td>
582
-
583
- <td><input type="hidden" name="fid" value="<?php echo $fields[$i]->id; ?>" />
584
- <span class="fixed-fields-options-expand"></span>
585
- <input type="submit" name="field_edit" value="Save" /></td>
586
- </tr>
587
- <tr <?php if ($z % 2 == 0) echo ' class="evenrow"'; ?> style="border:none;">
588
- <td class="fixed-fields-extra-options" colspan="7" style="border-bottom:1px solid black;">Field Instructions: <input type="text" name="field[field_instructions]" class="width200" value="<?php echo $fields[$i]->field_instructions; ?>" /> - <?php echo $this->fixed_fields[$fields[$i]->field_slug]; ?></td>
589
- </tr>
590
- </form>
591
- <?php
592
- }
593
- ?>
594
- </tbody>
595
- <tfoot>
596
- <tr>
597
- <th scope="col" class="manage-column field-slug">Slug</th>
598
- <th scope="col" class="manage-column field-label">Label</th>
599
- <th scope="col" class="manage-column field-type">Type</th>
600
- <th scope="col" class="manage-column field-value">Initial Value</th>
601
- <th scope="col" class="manage-column field-value">Required</th>
602
- <th scope="col" class="manage-column field-maxlength">Maxlength</th>
603
- <th scope="col" class="manage-column field-action">Action</th>
604
- </tr>
605
- </tfoot>
606
- </table><a name="manage-field-options"></a>
607
- <div id="field-options" class="postbox">
608
- <h3 class="hndle"><span>Manage Field Options (for Dropdown and Radio Fields)</span></h3>
609
- <div class="inside">
610
- <div class="option-header">
611
- <div class="slug">Slug</div>
612
- <div class="label">Label</div>
613
- <div class="option-value">Value</div>
614
- <div class="action">Action</div>
615
- </div>
616
- <table id="edit-field-options">
617
- <?php
618
- $options = parent::selectAllFieldOptions();
619
- $i = 0;
620
- foreach ($options as $option) {
621
- ?>
622
- <tr<?php if ($i % 2 == 1) echo ' class="evenrow-field-options"'; ?>>
623
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']?>">
624
- <td class="slug"><input type="text" maxlength="20" name="option[option_slug]" value="<?php echo $option->option_slug; ?>" class="width50" /></td>
625
- <td class="label"><input type="text" name="option[option_label]" value="<?php echo $option->option_label; ?>" class="width100" /></td>
626
- <td class="option-value"><input type="text" name="option[option_value]" value="<?php echo $option->option_value; ?>" class="width100" /></td>
627
- <td class="action">
628
- <input type="submit" value="Save" name="edit_field_option" />
629
- <input type="submit"class="delete_button" value="Delete" name="delete_field_option" />
630
- </td>
631
- <input type="hidden" name="oid" value="<?php echo $option->id; ?>" />
632
- </form>
633
- </tr>
634
- <?php
635
- $i++;
636
- } if (empty($options)) {
637
- ?>
638
- <tr><td class="ccf-center">No field options have been created.</td></tr>
639
- <?php
640
- }
641
- ?>
642
- </table>
643
- <div class="option-header">
644
- <div class="slug">Slug</div>
645
- <div class="label">Label</div>
646
- <div class="option-value">Value</div>
647
- <div class="action">Action</div>
648
- </div>
649
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']?>">
650
- <div class="create-field-options-header">Create a Field Option</div>
651
- <ul id="create-field-options">
652
- <li><label for="option[option_slug]">* Option Slug:</label> <input maxlength="20" type="text" name="option[option_slug]" /><br />
653
- (Used to identify this option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: "slug_one")</li>
654
- <li><label for="option[option_label]">* Option Label:</label> <input type="text" name="option[option_label]" /><br />
655
- (This is what is shown to the user in the dropdown or radio field. Example:)</li>
656
- <li><label for="option[option_value]">Option Value:</label> <input type="text" name="option[option_value]" /><br />
657
- (This is the actual value of the option which isn't shown to the user. This can be the same thing as the label. An example pairing of label => value is: "The color green" => "green" or "Yes" => "1".)</li>
658
- <li><input type="submit" name="create_field_option" value="Create Field Option" /></li>
659
- </ul>
660
- <p id="edit-field-comments"><b>*</b> The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually sent in the email to you. For dropdown fields the option value is optional, for radio fields it is required.</p>
661
- </form>
662
- </div>
663
- </div>
664
- <a name="manage-forms"></a>
665
- <h3 class="manage-h3">Manage Forms</h3>
666
- <table class="widefat post" id="manage-forms" cellspacing="0">
667
- <thead>
668
- <tr>
669
- <th scope="col" class="manage-column form-code">Form Display Code</th>
670
- <th scope="col" class="manage-column form-slug">Slug</th>
671
- <th scope="col" class="manage-column form-title">Title</th>
672
- <th scope="col" class="manage-column form-submit">Button Text</th>
673
- <th scope="col" class="manage-column form-submit">Style</th>
674
- <th scope="col" class="manage-column form-submit">Action</th>
675
- </tr>
676
- </thead>
677
- <tbody>
678
- <?php
679
- $forms = parent::selectAllForms();
680
- for ($i = 0; $i < count($forms); $i++) {
681
- $form_methods = '<option>Post</option><option>Get</option>';
682
- $form_methods = str_replace('<option>'.$forms[$i]->form_method.'</option>', '<option selected="selected">'.$forms[$i]->form_method.'</option>', $form_methods);
683
- $add_fields = $this->getFieldsForm();
684
- $this_style = parent::selectStyle($forms[$i]->form_style, '');
685
- $sty_opt = str_replace('<option value="'.$forms[$i]->form_style.'">'.$this_style->style_slug.'</option>', '<option value="'.$forms[$i]->form_style.'" selected="selected">'.$this_style->style_slug.'</option>', $style_options);
686
- ?>
687
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
688
- <tr class="<?php if ($i % 2 == 0) echo 'evenrow'; ?>">
689
- <td><span class="bold">[customcontact form=<?php echo $forms[$i]->id ?>]</span></td>
690
- <td><input type="text" class="width75" name="form[form_slug]" value="<?php echo $forms[$i]->form_slug; ?>" /></td>
691
- <td><input type="text" class="width125" name="form[form_title]" value="<?php echo $forms[$i]->form_title; ?>" /></td>
692
- <td><input class="width100" type="text" name="form[submit_button_text]" value="<?php echo $forms[$i]->submit_button_text; ?>" /></td>
693
- <td><select name="form[form_style]"><?php echo $sty_opt; ?></select></td>
694
- <td><input type="hidden" name="fid" value="<?php echo $forms[$i]->id; ?>" />
695
- <span class="form-options-expand"></span>
696
- <input type="submit" name="form_edit" value="Save" />
697
- <input type="submit" name="form_delete" class="delete_button" value="Delete" />
698
- </td>
699
- </tr>
700
- <tr class="<?php if ($i % 2 == 0) echo 'evenrow'; ?>">
701
- <td class="form-extra-options textcenter" colspan="8" style="border-bottom:1px solid black;">
702
- <table class="form-extra-options-table">
703
- <tbody>
704
- <tr>
705
- <td class="bold">Method</td>
706
- <td class="bold">Form Action</td>
707
- <td class="bold">Destination Email</td>
708
- <td class="bold">Success Message Title</td>
709
- <td class="bold">Success Message</td>
710
- <td class="bold">Custom Success URL</td>
711
- </tr>
712
- <tr>
713
- <td><select name="form[form_method]"><?php echo $form_methods; ?></select></td>
714
- <td><input class="width100" type="text" name="form[form_action]" value="<?php echo $forms[$i]->form_action; ?>" /></td>
715
- <td><input class="width100" type="text" name="form[form_email]" value="<?php echo $forms[$i]->form_email; ?>" /></td>
716
- <td><input type="text" name="form[form_success_title]" value="<?php echo $forms[$i]->form_success_title; ?>" /></td>
717
- <td><input type="text" name="form[form_success_message]" value="<?php echo $forms[$i]->form_success_message; ?>" /></td>
718
- <td><input type="text" class="width125" name="form[form_thank_you_page]" value="<?php echo $forms[$i]->form_thank_you_page; ?>" /></td>
719
- </tr>
720
- <tr>
721
- <td colspan="3">
722
- <label for="dettach_field_id"><span>Attached Fields:</span></label>
723
- <?php
724
- $attached_fields = parent::getAttachedFieldsArray($forms[$i]->id);
725
- if (empty($attached_fields)) echo 'None ';
726
- else {
727
- echo '<select name="dettach_field_id">';
728
- foreach($attached_fields as $attached_field) {
729
- $this_field = parent::selectField($attached_field, '');
730
- echo $this_field->field_slug . ' <option value="'.$this_field->id.'">'.$this_field->field_slug.'</option>';
731
- }
732
- echo '</select> <input type="submit" value="Dettach Field" name="dettach_field" />';
733
- }
734
- ?><br />
735
- <span class="red bold">*</span> Attach fields in the order you want them displayed.
736
- </td>
737
- <td colspan="3">
738
- <label for="field_id"><span>Attach Field:</span></label>
739
- <select name="field_id"><?php echo $add_fields; ?></select> <input type="submit" name="form_add_field" value="Attach Field" />
740
- <br /><span class="red bold">*</span> Attach fixed fields or ones you <a href="#create-fields">create</a>.
741
- </td>
742
- </tr>
743
- <tr>
744
- <td colspan="6"><label for="theme_code_<?php echo $forms[$i]->id; ?>"><span>Code to Display Form in Theme Files:</span></label> <input type="text" class="width225" value="&lt;?php if (function_exists('serveCustomContactForm')) { serveCustomContactForm(<?php echo $forms[$i]->id; ?>); } ?&gt;" name="theme_code_<?php echo $forms[$i]->id; ?>" /> <label for="form[custom_code]">Custom Code</label> <input name="form[custom_code]" type="text" value="<?php echo $forms[$i]->custom_code; ?>" /></td>
745
- </tr>
746
- </tbody>
747
- </table>
748
- </td>
749
- </tr>
750
-
751
- </form>
752
- <?php
753
- }
754
- $remember_check = ($admin_options[remember_field_values] == 0) ? 'selected="selected"' : '';
755
- $remember_fields = '<option value="1">Yes</option><option '.$remember_check.' value="0">No</option>';
756
- $border_style_options = '<option>solid</option><option>dashed</option>
757
- <option>grooved</option><option>double</option><option>dotted</option><option>ridged</option><option>none</option>
758
- <option>inset</option><option>outset</option>';
759
- ?>
760
- </tbody>
761
- <tfoot>
762
- <tr>
763
- <tr>
764
- <th scope="col" class="manage-column form-code">Form Code</th>
765
- <th scope="col" class="manage-column form-slug">Slug</th>
766
- <th scope="col" class="manage-column form-title">Title</th>
767
- <th scope="col" class="manage-column form-submit">Button Text</th>
768
- <th scope="col" class="manage-column form-submit">Style</th>
769
- <th scope="col" class="manage-column form-submit">Action</th>
770
- </tr>
771
- </tr>
772
-
773
- </tfoot>
774
- </table><a name="general-settings"></a>
775
- <div id="general-settings" class="postbox">
776
- <h3 class="hndle"><span>General Settings</span></h3>
777
- <div class="inside">
778
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
779
- <ul>
780
- <li>
781
- <label for="default_to_email">Default Email:</label>
782
- <input name="default_to_email" value="<?php echo $admin_options[default_to_email]; ?>" type="text" maxlength="100" />
783
- </li>
784
- <li class="descrip">Form emails will be sent <span>to</span> this address, if no destination email is specified by the form.</li>
785
-
786
- <li>
787
- <label for="enable_jquery">Enable JQuery:</label>
788
- <select name="enable_jquery"><option value="1">Yes</option><option <?php if ($admin_options[enable_jquery] != 1) echo 'selected="selected"'; ?> value="0">No</option></select>
789
- </li>
790
- <li class="descrip">Some plugins don't setup JQuery correctly, so when any other plugin uses JQuery (whether correctly or not), JQuery works for neither plugin. This plugin uses JQuery correctly. If another plugin isn't using JQuery correctly but is more important to you than this one: disable this option. 99% of this plugin's functionality will work without JQuery, just no field instruction tooltips.</li>
791
-
792
- <li>
793
- <label for="default_from_email">Default From Email:</label>
794
- <input name="default_from_email" value="<?php echo $admin_options[default_from_email]; ?>" type="text" maxlength="100" />
795
- </li>
796
- <li class="descrip">Form emails will be sent <span>from</span> this address. It is recommended you provide a real email address that has been created through your host.</li>
797
- <li>
798
- <label for="default_form_subject">Default Email Subject:</label>
799
- <input name="default_form_subject" value="<?php echo $admin_options[default_form_subject]; ?>" type="text" />
800
- </li>
801
- <li class="descrip">Default subject to be included in all form emails.</li>
802
- <li>
803
- <label for="form_success_message_title">Default Form Success Message Title:</label>
804
- <input name="form_success_message_title" value="<?php echo $admin_options[form_success_message_title]; ?>" type="text"/>
805
- </li>
806
- <li class="descrip">If someone fills out a form for which a success message title is not provided and a custom success page is not provided, the plugin will show a popover using this field as the window title.</li>
807
-
808
- <li>
809
- <label for="form_success_message">Default Form Success Message:</label>
810
- <input name="form_success_message" value="<?php echo $admin_options[form_success_message]; ?>" type="text"/>
811
- </li>
812
- <li class="descrip">If someone fills out a form for which a success message is not provided and a custom success page is not provided, the plugin will show a popover containing this message.</li>
813
-
814
- <li>
815
- <label for="remember_field_values">Remember Field Values:</label>
816
- <select name="remember_field_values"><option value="1">Yes</option><option <?php if ($admin_options[remember_field_values] == 0) echo 'selected="selected"'; ?> value="0">No</option></select>
817
- </li>
818
- <li class="descrip">Selecting yes will make form fields remember how they were last filled out.</li>
819
- <li>
820
- <label for="enable_widget_tooltips">Enable Tooltips in Widget:</label>
821
- <select name="enable_widget_tooltips"><option value="1">Yes</option><option <?php if ($admin_options[enable_widget_tooltips] == 0) echo 'selected="selected"'; ?> value="0">No</option></select>
822
- </li>
823
- <li class="descrip">Enabling this shows tooltips containing field instructions on forms in the widget.</li>
824
- <li>
825
- <label for="author_link">Hide Plugin Author Link in Code:</label>
826
- <select name="author_link"><option value="1">Yes</option><option <?php if ($admin_options[author_link] == 0) echo 'selected="selected"'; ?> value="0">No</option></select>
827
- </li>
828
- <li>
829
- <label for="code_type">Use Code Type:</label>
830
- <select name="code_type"><option>XHTML</option><option <?php if ($admin_options[code_type] == 'HTML') echo 'selected="selected"'; ?>>HTML</option></select>
831
- </li>
832
- <li class="descrip">This lets you switch the form code between HTML and XHTML.</li>
833
- <li>
834
- <label for="wp_mail_function">Use Wordpress Mail Function:</label>
835
- <select name="wp_mail_function"><option value="1">Yes</option><option <?php if ($admin_options[wp_mail_function] == 0) echo 'selected="selected"'; ?> value="0">No</option></select>
836
- </li>
837
- <li class="descrip">Setting this to no will use the PHP mail function. If your forms aren't sending mail properly try setting this to no.</li>
838
- <li class="show-widget"><b>Show Sidebar Widget:</b></li>
839
- <li>
840
- <label>
841
- <input value="1" type="checkbox" name="show_widget_home" <?php if ($admin_options[show_widget_home] == 1) echo 'checked="checked"'; ?> />
842
- On Homepage</label>
843
- </li>
844
- <li>
845
- <label>
846
- <input value="1" type="checkbox" name="show_widget_pages" <?php if ($admin_options[show_widget_pages] == 1) echo 'checked="checked"'; ?> />
847
- On Pages</label>
848
- </li>
849
- <li>
850
- <label>
851
- <input value="1" type="checkbox" name="show_widget_singles" <?php if ($admin_options[show_widget_singles] == 1) echo 'checked="checked"'; ?> />
852
- On Single Posts</label>
853
- </li>
854
- <li>
855
- <label>
856
- <input value="1" type="checkbox" name="show_widget_categories" <?php if ($admin_options[show_widget_categories] == 1) echo 'checked="checked"'; ?> />
857
- On Categories</label>
858
- </li>
859
- <li>
860
- <label>
861
- <input value="1" type="checkbox" name="show_widget_archives" <?php if ($admin_options[show_widget_archives] == 1) echo 'checked="checked"'; ?> />
862
- On Archives</label>
863
- </li>
864
- <li>
865
- <input type="submit" value="Save Settings" name="general_settings" />
866
- </li>
867
- </ul>
868
- </form>
869
- </div>
870
- </div><a name="instructions"></a>
871
- <div id="instructions" class="postbox">
872
- <h3 class="hndle"><span>Instructions</span></h3>
873
- <div class="inside">
874
- <p><b>The default content will help you get a better feel of ways this plugin can be used and is the best way to learn.</b></p>
875
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
876
- <div class="ccf-center">
877
- <input type="submit" value="Insert Default Content" name="insert_default_content" />
878
- </div>
879
- </form>
880
- <p>1. Create a form.</p>
881
- <p>2. Create fields and attach those fields to the forms of your choice. <span class="red bold">*</span> Attach the fields in the order that you want them to show up in the form. If you mess up you can detach and reattach them. Create field options in the field option manager; field options should be attached to radio and dropdown fields.</p>
882
- <p>3. Display those forms in posts and pages by inserting the code: [customcontact form=<b>FORMID</b>]. Replace <b>FORMID</b> with the id listed to the left of the form slug next to the form of your choice above. You can also display forms in theme files; the code for this is provided within each forms admin section.</p>
883
- <p>4. Prevent spam by attaching the fixed field, captcha or ishuman. Captcha requires users to type in a number shown on an image. Ishuman requires users to check a box to prove they aren't a spam bot.</p>
884
- <p>5. Add a form to your sidebar, by dragging the Custom Contact Form widget in to your sidebar.</p>
885
- <p>6. Configure the General Settings appropriately; this is important if you want to receive your web form messages!</p>
886
- <p>7. Create form styles to change your forms appearances. The image below explains how each style field can change the look of your forms.</p>
887
- <p>8. (advanced) If you are confident in your HTML and CSS skills, you can use the <a href="#custom-html">Custom HTML Forms feature</a> as a framework and write your forms from scratch. This allows you to use this plugin simply to process your form requests. The Custom HTML Forms feature will process and email any form variables sent to it regardless of whether they are created in the fields manager.</p>
888
- <p><span class="red bold">*</span> These instructions briefly tell you in which order you should use forms, fields, field options, and styles. <b>If you want to read in detail about using forms, fields, field options, styles and the rest of this plugin, click the button below.</b></p>
889
- <div class="ccf-center">
890
- <input type="button" class="usage-popover-button" value="View Plugin Usage Popover" />
891
- </div>
892
- <div class="ccf-style-example"></div>
893
- <div class="ccf-success-popover-example"></div>
894
- </div>
895
- </div>
896
- <a name="create-styles"></a>
897
- <div id="create-styles" class="postbox">
898
- <h3 class="hndle"><span>Create A Style for Your Forms</span></h3>
899
- <div class="inside">
900
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
901
- <ul class="style_left">
902
- <li>
903
- <label for="style_slug">* Style Slug:</label>
904
- <input type="text" maxlength="30" class="width75" name="style[style_slug]" />
905
- (Must be unique)</li>
906
- <li>
907
- <label for="title_fontsize">Title Font Size:</label>
908
- <input type="text" maxlength="20" value="1.2em" class="width75" name="style[title_fontsize]" />
909
- (ex: 10pt, 10px, 1em)</li>
910
- <li>
911
- <label for="title_fontcolor">Title Font Color:</label>
912
- <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[title_fontcolor]" />
913
- (ex: FF0000)</li>
914
- <li>
915
- <label for="label_width">Label Width:</label>
916
- <input type="text" maxlength="20" value="110px" class="width75" name="style[label_width]" />
917
- (ex: 100px or 20%)</li>
918
- <li>
919
- <label for="label_fontsize">Label Font Size:</label>
920
- <input type="text" maxlength="20" value="1em" class="width75" name="style[label_fontsize]" />
921
- (ex: 10px, 10pt, 1em)</li>
922
- <li>
923
- <label for="label_fontcolor">Label Font Color:</label>
924
- <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[label_fontcolor]" />
925
- (ex: FF0000)</li>
926
- <li>
927
- <label for="input_width">Text Field Width:</label>
928
- <input type="text" maxlength="20" value="200px" class="width75" name="style[input_width]" />
929
- (ex: 100px or 100%)</li>
930
- <li>
931
- <label for="textarea_width">Textarea Field Width:</label>
932
- <input type="text" maxlength="20" value="200px" class="width75" name="style[textarea_width]" />
933
- (ex: 100px or 100%)</li>
934
- <li>
935
- <label for="textarea_height">Textarea Field Height:</label>
936
- <input type="text" maxlength="20" value="100px" class="width75" name="style[textarea_height]" />
937
- (ex: 100px or 100%)</li>
938
- <li>
939
- <label for="field_fontsize">Field Font Size:</label>
940
- <input type="text" maxlength="20" value="1em" class="width75" name="style[field_fontsize]" />
941
- (ex: 10px, 10pt, 1em</li>
942
- <li>
943
- <label for="field_fontcolor">Field Font Color:</label>
944
- <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[field_fontcolor]" />
945
- (ex: 333333)</li>
946
- <li>
947
- <label for="field_borderstyle">Field Border Style:</label>
948
- <select class="width75" name="style[field_borderstyle]"><?php echo str_replace('<option>solid</option>', '<option selected="selected">solid</option>', $border_style_options); ?></select>
949
- </li>
950
- <li>
951
- <label for="form_margin">Form Margin:</label>
952
- <input type="text" maxlength="20" value="5px" class="width75" name="style[form_margin]" />
953
- (ex: 5px or 1em)</li>
954
- <li>
955
- <label for="label_margin">Label Margin:</label>
956
- <input type="text" maxlength="20" value="4px" class="width75" name="style[label_margin]" />
957
- (ex: 5px or 1em)</li>
958
- <li>
959
- <label for="textarea_backgroundcolor">Textarea Background Color:</label>
960
- <input type="text" maxlength="20" value="ffffff" class="width75 colorfield" name="style[textarea_backgroundcolor]" />
961
- (ex: FF0000)</li>
962
- <li>
963
- <label for="success_popover_fontcolor">Success Popover Font Color:</label>
964
- <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[success_popover_fontcolor]" />
965
- (ex: 333333)</li>
966
- <li>
967
- <label for="success_popover_title_fontsize">Success Popover Title Font Size:</label>
968
- <input type="text" maxlength="20" value="12px" class="width75" name="style[success_popover_title_fontsize]" />
969
- (ex: 12px, 1em, 100%)</li>
970
- </ul>
971
- <ul class="style_right">
972
- <li>
973
- <label for="input_width">Field Border Color:</label>
974
- <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[field_bordercolor]" />
975
- (ex: 100px or 100%)</li>
976
- <li>
977
- <label for="form_borderstyle">Form Border Style:</label>
978
- <select class="width75" name="style[form_borderstyle]"><?php echo str_replace('<option>solid</option>', '<option selected="selected">solid</option>', $border_style_options); ?></select>
979
- </li>
980
- <li>
981
- <label for="form_bordercolor">Form Border Color:</label>
982
- <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[form_bordercolor]" />
983
- (ex: 000000)</li>
984
- <li>
985
- <label for="form_borderwidth">Form Border Width:</label>
986
- <input type="text" maxlength="20" value="1px" class="width75" name="style[form_borderwidth]" />
987
- (ex: 1px)</li>
988
- <li>
989
- <label for="form_borderwidth">Form Width:</label>
990
- <input type="text" maxlength="20" value="500px" class="width75" name="style[form_width]" />
991
- (ex: 100px or 50%)</li>
992
- <li>
993
- <label for="form_borderwidth">Form Font Family:</label>
994
- <input type="text" maxlength="150" value="Verdana, tahoma, arial" class="width75" name="style[form_fontfamily]" />
995
- (ex: Verdana, Tahoma, Arial)</li>
996
- <li>
997
- <label for="submit_width">Button Width:</label>
998
- <input type="text" maxlength="20" value="80px" class="width75" name="style[submit_width]" />
999
- (ex: 100px or 30%)</li>
1000
- <li>
1001
- <label for="submit_height">Button Height:</label>
1002
- <input type="text" maxlength="20" value="35px" class="width75" name="style[submit_height]" />
1003
- (ex: 100px or 30%)</li>
1004
- <li>
1005
- <label for="submit_fontsize">Button Font Size:</label>
1006
- <input type="text" maxlength="20" value="1.1em" class="width75" name="style[submit_fontsize]" />
1007
- (ex: 10px, 10pt, 1em</li>
1008
- <li>
1009
- <label for="submit_fontcolor">Button Font Color:</label>
1010
- <input type="text" maxlength="20" value="333333" class="width75 colorfield" name="style[submit_fontcolor]" />
1011
- (ex: FF0000)</li>
1012
- <li>
1013
- <label for="field_backgroundcolor">Field Background Color:</label>
1014
- <input type="text" maxlength="20" value="efefef" class="width75 colorfield" name="style[field_backgroundcolor]" />
1015
- (ex: FF0000)</li>
1016
- <li>
1017
- <label for="form_padding">Form Padding:</label>
1018
- <input type="text" maxlength="20" value="5px" class="width75" name="style[form_padding]" />
1019
- (ex: 5px or 1em)</li>
1020
- <li>
1021
- <label for="title_margin">Title Margin:</label>
1022
- <input type="text" maxlength="20" value="2px" class="width75" name="style[title_margin]" />
1023
- (ex: 5px or 1em)</li>
1024
- <li>
1025
- <label for="title_margin">Dropdown Width:</label>
1026
- <input type="text" maxlength="20" value="auto" class="width75" name="style[dropdown_width]" />
1027
- (ex: 30px, 20%, or auto)</li>
1028
- <li>
1029
- <label for="success_popover_bordercolor">Success Popover Border Color:</label>
1030
- <input type="text" maxlength="20" value="efefef" class="width75 colorfield" name="style[success_popover_bordercolor]" />
1031
- (ex: FF0000)</li>
1032
- <li>
1033
- <label for="success_popover_fontsize">Success Popover Font Size:</label>
1034
- <input type="text" maxlength="20" value="12px" class="width75" name="style[success_popover_fontsize]" />
1035
- (ex: 12px, 1em, 100%)</li>
1036
- <li>
1037
- <label for="success_popover_title_fontsize">Success Popover Title Font Size:</label>
1038
- <input type="text" maxlength="20" value="12px" class="width75" name="style[success_popover_title_fontsize]" />
1039
- (ex: 12px, 1em, 100%)</li>
1040
- <li>
1041
- <label for="success_popover_height">Success Popover Height:</label>
1042
- <input type="text" maxlength="20" value="200px" class="width75" name="style[success_popover_height]" />
1043
- (ex: 200px, 6em, 50%)</li>
1044
- <li>
1045
- <input type="submit" value="Create Style" name="style_create" />
1046
- </li>
1047
- </ul>
1048
- </form>
1049
- </div>
1050
- </div><a name="manage-styles"></a>
1051
- <h3 class="manage-h3">Manage Form Styles</h3>
1052
- <table class="widefat post" id="manage-styles" cellspacing="0">
1053
- <thead>
1054
- <tr>
1055
- <th scope="col" class="manage-column"></th>
1056
- <th scope="col" class="manage-column"></th>
1057
- <th scope="col" class="manage-column"></th>
1058
- <th scope="col" class="manage-column"></th>
1059
- <th scope="col" class="manage-column"></th>
1060
- <th scope="col" class="manage-column"></th>
1061
- </tr>
1062
- </thead>
1063
- <tbody>
1064
- <?php
1065
- $styles = parent::selectAllStyles();
1066
- $i = 0;
1067
- foreach ($styles as $style) {
1068
- ?>
1069
- <tr class="<?php if ($i % 2 == 0) echo 'evenrow'; ?>">
1070
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1071
- <td><label>* Slug:</label> <input type="text" maxlength="30" value="<?php echo $style->style_slug; ?>" name="style[style_slug]" /><br />
1072
- <label>Font Family:</label><input type="text" maxlength="20" value="<?php echo $style->form_fontfamily; ?>" name="style[form_fontfamily]" /><br />
1073
- <label>Textarea Background<br />Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->textarea_backgroundcolor; ?>" name="style[textarea_backgroundcolor]" /><br />
1074
- <label>Success Popover<br />Border Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_bordercolor; ?>" name="style[success_popover_bordercolor]" /><br />
1075
- <input type="submit" class="submit-styles" name="style_edit" value="Save" /><br />
1076
- <input type="submit" class="submit-styles delete_button" name="style_delete" value="Delete Style" />
1077
- </td>
1078
-
1079
- <td>
1080
- <label>Form Width:</label><input type="text" maxlength="20" value="<?php echo $style->form_width; ?>" name="style[form_width]" /><br />
1081
- <label>Text Field Width:</label><input type="text" maxlength="20" value="<?php echo $style->input_width; ?>" name="style[input_width]" /><br />
1082
- <label>Textarea Width:</label><input type="text" maxlength="20" value="<?php echo $style->textarea_width; ?>" name="style[textarea_width]" /><br />
1083
- <label>Textarea Height:</label><input type="text" maxlength="20" value="<?php echo $style->textarea_height; ?>" name="style[textarea_height]" /><br />
1084
- <label>Dropdown Width:</label><input type="text" maxlength="20" value="<?php echo $style->dropdown_width; ?>" name="style[dropdown_width]" /><br />
1085
- <label>Label Margin:</label><input type="text" maxlength="20" value="<?php echo $style->label_margin; ?>" name="style[label_margin]" /><br />
1086
- <label>Success Popover<br />Height:</label><input type="text" maxlength="20" value="<?php echo $style->success_popover_height; ?>" name="style[success_popover_height]" /><br />
1087
- </td>
1088
- <td>
1089
- <label>Label Width:</label><input type="text" maxlength="20" value="<?php echo $style->label_width; ?>" name="style[label_width]" /><br />
1090
- <label>Button Width:</label><input type="text" maxlength="20" value="<?php echo $style->submit_width; ?>" name="style[submit_width]" /><br />
1091
- <label>Button Height:</label><input type="text" maxlength="20" value="<?php echo $style->submit_height; ?>" name="style[submit_height]" /><br />
1092
- <label>Field Background Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_backgroundcolor; ?>" name="style[field_backgroundcolor]" /><br />
1093
- <label>Title Margin:</label><input type="text" maxlength="20" value="<?php echo $style->title_margin; ?>" name="style[title_margin]" /><br />
1094
- <label>Success Popover<br />Title Font Size:</label><input type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontsize; ?>" name="style[success_popover_title_fontsize]" />
1095
- </td>
1096
-
1097
- <td>
1098
- <label>Title Font Size:</label><input type="text" maxlength="20" value="<?php echo $style->title_fontsize; ?>" name="style[title_fontsize]" /><br />
1099
- <label>Label Font Size:</label><input type="text" maxlength="20" value="<?php echo $style->label_fontsize; ?>" name="style[label_fontsize]" /><br />
1100
- <label>Field Font Size:</label><input type="text" maxlength="20" value="<?php echo $style->field_fontsize; ?>" name="style[field_fontsize]" /><br />
1101
- <label>Button Font Size:</label><input type="text" maxlength="20" value="<?php echo $style->submit_fontsize; ?>" name="style[submit_fontsize]" /><br />
1102
- <label>Form Padding:</label><input type="text" maxlength="20" value="<?php echo $style->form_padding; ?>" name="style[form_padding]" /><br />
1103
- <label>Success Popover<br />Font Size:</label><input type="text" maxlength="20" value="<?php echo $style->success_popover_fontsize; ?>" name="style[success_popover_fontsize]" />
1104
- </td>
1105
-
1106
- <td>
1107
- <label>Title Font Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->title_fontcolor; ?>" name="style[title_fontcolor]" /><br />
1108
- <label>Label Font Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->label_fontcolor; ?>" name="style[label_fontcolor]" /><br />
1109
- <label>Field Font Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_fontcolor; ?>" name="style[field_fontcolor]" /><br />
1110
- <label>Button Font Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->submit_fontcolor; ?>" name="style[submit_fontcolor]" /><br />
1111
- <label>Form Margin:</label><input type="text" maxlength="20" value="<?php echo $style->form_margin; ?>" name="style[form_margin]" /><br />
1112
- <label>Success Popover<br />Font Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_fontcolor; ?>" name="style[success_popover_fontcolor]" /><br />
1113
- </td>
1114
-
1115
- <td><label>Form Border Style:</label><select name="style[form_borderstyle]"><?php echo str_replace('<option>'.$style->form_borderstyle.'</option>', '<option selected="selected">'.$style->form_borderstyle.'</option>', $border_style_options); ?></select><br />
1116
- <label>Form Border Width:</label><input type="text" maxlength="20" value="<?php echo $style->form_borderwidth; ?>" name="style[form_borderwidth]" /><br />
1117
- <label>Form Border Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->form_bordercolor; ?>" name="style[form_bordercolor]" /><br />
1118
- <label>Field Border Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_bordercolor; ?>" name="style[field_bordercolor]" /><br />
1119
- <label>Field Border Style:</label><select name="style[field_borderstyle]"><?php echo str_replace('<option>'.$style->field_borderstyle.'</option>', '<option selected="selected">'.$style->field_borderstyle.'</option>', $border_style_options); ?></select><br />
1120
- <label>Success Popover<br />Title Font Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontcolor; ?>" name="style[success_popover_title_fontcolor]" /><br />
1121
- <input name="sid" type="hidden" value="<?php echo $style->id; ?>" />
1122
- </td>
1123
-
1124
- </form>
1125
- </tr>
1126
- <?php
1127
- $i++;
1128
- }
1129
- ?>
1130
- </tbody>
1131
- <tfoot>
1132
- <tr>
1133
- <th scope="col" class="manage-column"></th>
1134
- <th scope="col" class="manage-column"></th>
1135
- <th scope="col" class="manage-column"></th>
1136
- <th scope="col" class="manage-column"></th>
1137
- <th scope="col" class="manage-column"></th>
1138
- <th scope="col" class="manage-column"></th>
1139
- </tr>
1140
- </tfoot>
1141
- </table><a name="contact-author"></a>
1142
- <div id="contact-author" class="postbox">
1143
- <h3 class="hndle"><span>Report a Bug/Suggest a Feature</span></h3>
1144
- <div class="inside">
1145
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
1146
- <ul>
1147
- <li><label for="name">Your Name:</label>
1148
- <input id="name" type="text" name="name" maxlength="100" /></li>
1149
- <li><label for="email">Your Email:</label>
1150
- <input id="email" type="text" value="<?php echo get_option('admin_email'); ?>" name="email" maxlength="100" /></li>
1151
- <li><label for="message">* Your Message:</label>
1152
- <textarea id="message" name="message"></textarea></li>
1153
- <li><label for="type">* Purpose of this message:</label> <select id="type" name="type"><option>Bug Report</option><option>Suggest a Feature</option></select></li>
1154
- </ul>
1155
- <p><input type="submit" name="contact_author" value="Send Message" /></p>
1156
- </form>
1157
- </div>
1158
- </div>
1159
- <a name="custom-html"></a>
1160
- <div id="custom-html" class="postbox">
1161
- <h3 class="hndle"><span>Custom HTML Forms (Advanced)</span></h3>
1162
- <div class="inside">
1163
- <p>If you know HTML and simply want to use this plugin to process form requests, this feature is for you.
1164
- The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following:
1165
- <b>a)</b> Keep the form action/method the same (yes the action is supposed to be empty), <b>b)</b> Include all the hidden fields shown below, <b>c)</b> provide a
1166
- hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately.</p>
1167
- <textarea id="custom_html_textarea">
1168
- &lt;form method=&quot;post&quot; action=&quot;&quot;&gt;
1169
- &lt;input type=&quot;hidden&quot; name=&quot;ccf_customhtml&quot; value=&quot;1&quot; /&gt;
1170
- &lt;input type=&quot;hidden&quot; name=&quot;success_message&quot; value=&quot;Thank you for filling out our form!&quot; /&gt;
1171
- &lt;input type=&quot;hidden&quot; name=&quot;thank_you_page&quot; value=&quot;http://www.google.com&quot; /&gt;
1172
- &lt;input type=&quot;hidden&quot; name=&quot;destination_email&quot; value=&quot;<?php echo $admin_options[default_to_email]; ?>&quot; /&gt;
1173
- &lt;input type=&quot;hidden&quot; name=&quot;required_fields&quot; value=&quot;field_name1, field_name2&quot; /&gt;
1174
-
1175
- &lt;!-- Build your form in here. It is recommended you only use this feature if you are experienced with HTML.
1176
- The success_message field will add a popover containing the message when the form is completed successfully, the thank_you_page field will force
1177
- the user to be redirected to that specific page on successful form completion. The required_fields hidden field is optional; to use it seperate
1178
- the field names you want required by commas. Remember to use underscores instead of spaces in field names! --&gt;
1179
-
1180
- &lt;/form&gt;</textarea>
1181
- </div>
1182
- </div>
1183
- <a name="plugin-news"></a>
1184
- <div id="plugin-news" class="postbox">
1185
- <h3 class="hndle"><span>Custom Contact Forms Plugin News</span></h3>
1186
- <div class="inside">
1187
- <?php $this->displayPluginNewsFeed(); ?>
1188
- </div>
1189
- </div>
1190
- </div>
1191
- <?php
1192
  }
1193
 
1194
  function contentFilter($content) {
1195
  $errors = $this->getAllFormErrors();
1196
  if (!empty($errors)) {
1197
- $out = '<div id="custom-contact-forms-errors"><p>You filled the out form incorrectly.</p><ul>' . "\n";
1198
  $errors = $this->getAllFormErrors();
1199
  foreach ($errors as $error) {
1200
  $out .= '<li>'.$error.'</li>' . "\n";
1201
  }
1202
- $err_link = (!empty($this->error_return)) ? '<p><a href="'.$this->error_return.'" title="Go Back">&lt; Back to Form</a></p>' : '';
1203
  return $out . '</ul>' . "\n" . $err_link . '</div>';
1204
  }
1205
  $matches = array();
@@ -1245,32 +387,30 @@ the field names you want required by commas. Remember to use underscores instead
1245
 
1246
  function displayPluginNewsFeed() {
1247
  include_once(ABSPATH . WPINC . '/feed.php');
1248
- $rss = fetch_feed('http://www.taylorlovett.com/category/custom-contact-forms/feed');
1249
- if (!is_wp_error($rss) ) {
1250
  $maxitems = $rss->get_item_quantity(5);
1251
  $rss_items = $rss->get_items(0, 1);
1252
  $rss_items2 = $rss->get_items(1, $maxitems);
1253
  }
1254
  ?>
1255
  <ul>
1256
- <?php if ($maxitems == 0) echo '<li>No items.</li>';
1257
  else
1258
- // Loop through each feed item and display each item as a hyperlink.
1259
  foreach ( $rss_items as $item ) : ?>
1260
  <li class="first">
1261
  <a href='<?php echo $item->get_permalink(); ?>'
1262
- title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
1263
  <?php echo $item->get_title(); ?></a><br />
1264
  <?php echo $item->get_content(); ?>
1265
  </li>
1266
  <?php endforeach; ?>
1267
  <?php if ($maxitems == 0) echo '';
1268
  else
1269
- // Loop through each feed item and display each item as a hyperlink.
1270
  foreach ( $rss_items2 as $item ) : ?>
1271
  <li>
1272
  <a href='<?php echo $item->get_permalink(); ?>'
1273
- title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
1274
  <?php echo $item->get_title(); ?></a><br />
1275
  </li>
1276
  <?php endforeach; ?>
@@ -1316,36 +456,41 @@ the field names you want required by commas. Remember to use underscores instead
1316
  $style = parent::selectStyle($form->form_style, '');
1317
  $style_class = $style->style_slug;
1318
  }
1319
- $form_title = parent::decodeOption($form->form_title, 1, 1);
1320
  $action = (!empty($form->form_action)) ? $form->form_action : $_SERVER['REQUEST_URI'];
1321
  $out .= '<form id="'.$form_id.'" method="'.strtolower($form->form_method).'" action="'.$action.'" class="'.$style_class.'">' . "\n";
1322
- $out .= parent::decodeOption($form->custom_code, 1, 1) . "\n";
1323
  if (!empty($form_title)) $out .= '<h4 id="h4-' . $form->id . '-' . $form_key . '">' . $form_title . '</h4>' . "\n";
1324
  $fields = parent::getAttachedFieldsArray($fid);
1325
  $hiddens = '';
1326
- $code_type = ($admin_options[code_type] == 'XHTML') ? ' /' : '';
1327
  foreach ($fields as $field_id) {
1328
  $field = parent::selectField($field_id, '');
 
1329
  $req = ($field->field_required == 1 or $field->field_slug == 'ishuman') ? '* ' : '';
1330
- $req_long = ($field->field_required == 1) ? ' (required)' : '';
1331
- $input_id = 'id="'.parent::decodeOption($field->field_slug, 1, 1).'-'.$form_key.'"';
1332
- $field_value = parent::decodeOption($field->field_value, 1, 1);
1333
  $instructions = (empty($field->field_instructions)) ? '' : 'title="' . $field->field_instructions . $req_long . '" class="ccf-tooltip-field"';
1334
- if ($admin_options[enable_widget_tooltips] == 0 && $is_sidebar) $instructions = '';
1335
- if ($_SESSION[fields][$field->field_slug]) {
1336
- if ($admin_options[remember_field_values] == 1)
1337
- $field_value = $_SESSION[fields][$field->field_slug];
1338
- } if ($field->user_field == 0 && $field->field_slug == 'captcha') {
1339
- $out .= '<div>' . "\n" . $this->getCaptchaCode($form->id) . "\n" . '</div>' . "\n";
 
 
 
 
1340
  } elseif ($field->field_type == 'Text') {
1341
  $maxlength = (empty($field->field_maxlength) or $field->field_maxlength <= 0) ? '' : ' maxlength="'.$field->field_maxlength.'"';
1342
- $out .= '<div>'."\n".'<label for="'.parent::decodeOption($field->field_slug, 1, 1).'">'. $req .parent::decodeOption($field->field_label, 1, 1).'</label>'."\n".'<input '.$instructions.' '.$input_id.' type="text" name="'.parent::decodeOption($field->field_slug, 1, 1).'" value="'.$field_value.'"'.$maxlength.''.$code_type.'>'."\n".'</div>' . "\n";
1343
  } elseif ($field->field_type == 'Hidden') {
1344
- $hiddens .= '<input type="hidden" name="'.parent::decodeOption($field->field_slug, 1, 1).'" value="'.$field_value.'" '.$input_id.''.$code_type.'>' . "\n";
1345
  } elseif ($field->field_type == 'Checkbox') {
1346
- $out .= '<div>'."\n".'<input '.$instructions.' type="checkbox" name="'.parent::decodeOption($field->field_slug, 1, 1).'" value="'.parent::decodeOption($field->field_value, 1, 1).'" '.$input_id.''.$code_type.'> '."\n".'<label class="checkbox" for="'.parent::decodeOption($field->field_slug, 1, 1).'">' . $req .parent::decodeOption($field->field_label, 1, 1).'</label>'."\n".'</div>' . "\n";
1347
  } elseif ($field->field_type == 'Textarea') {
1348
- $out .= '<div>'."\n".'<label for="'.parent::decodeOption($field->field_slug, 1, 1).'">'. $req .parent::decodeOption($field->field_label, 1, 1).'</label>'."\n".'<textarea '.$instructions.' '.$input_id.' rows="5" cols="40" name="'.parent::decodeOption($field->field_slug, 1, 1).'">'.$field_value.'</textarea>'."\n".'</div>' . "\n";
1349
  } elseif ($field->field_type == 'Dropdown') {
1350
  $field_options = '';
1351
  $options = parent::getAttachedFieldOptionsArray($field->id);
@@ -1356,8 +501,8 @@ the field names you want required by commas. Remember to use underscores instead
1356
  $field_options .= '<option'.$option_sel.''.$option_value.'>' . $option->option_label . '</option>' . "\n";
1357
  }
1358
  if (!empty($options)) {
1359
- if (!$is_sidebar) $out .= '<div>'."\n".'<select '.$instructions.' '.$input_id.' name="'.parent::decodeOption($field->field_slug, 1, 1).'">'."\n".$field_options.'</select>'."\n".'<label class="checkbox" for="'.parent::decodeOption($field->field_slug, 1, 1).'">'. $req .parent::decodeOption($field->field_label, 1, 1).'</label>'."\n".'</div>' . "\n";
1360
- else $out .= '<div>'."\n".'<label for="'.parent::decodeOption($field->field_slug, 1, 1).'">'. $req .parent::decodeOption($field->field_label, 1, 1).'</label>'."\n".'<select '.$instructions.' '.$input_id.' name="'.parent::decodeOption($field->field_slug, 1, 1).'">'."\n".$field_options.'</select>'."\n".'</div>' . "\n";
1361
  }
1362
  } elseif ($field->field_type == 'Radio') {
1363
  $field_options = '';
@@ -1365,30 +510,37 @@ the field names you want required by commas. Remember to use underscores instead
1365
  foreach ($options as $option_id) {
1366
  $option = parent::selectFieldOption($option_id);
1367
  $option_sel = ($field->field_value == $option->option_slug) ? ' checked="checked"' : '';
1368
- $field_options .= '<div><input'.$option_sel.' type="radio" '.$instructions.' name="'.parent::decodeOption($field->field_slug, 1, 1).'" value="'.parent::decodeOption($option->option_value, 1, 1).'"'.$code_type.'> <label class="select" for="'.parent::decodeOption($field->field_slug, 1, 1).'">' . parent::decodeOption($option->option_label, 1, 1) . '</label></div>' . "\n";
1369
  }
1370
- $field_label = (!empty($field->field_label)) ? '<label for="'.parent::decodeOption($field->field_slug, 1, 1).'">'. $req .parent::decodeOption($field->field_label, 1, 1).'</label>' : '';
1371
  if (!empty($options)) $out .= '<div>'."\n".$field_label."\n".$field_options."\n".'</div>' . "\n";
1372
  }
1373
  }
1374
- $submit_text = (!empty($form->submit_button_text)) ? parent::decodeOption($form->submit_button_text, 1, 0) : 'Submit';
1375
- $out .= '<input name="form_page" value="'.$_SERVER['REQUEST_URI'].'" type="hidden"'.$code_type.'>'."\n".'<input type="hidden" name="fid" value="'.$form->id.'"'.$code_type.'>'."\n".$hiddens."\n".'<input type="submit" id="submit-' . $form->id . '-'.$form_key.'" class="submit" value="' . $submit_text . '" name="customcontactforms_submit"'.$code_type.'>' . "\n" . '</form>';
1376
- if ($admin_options[author_link] == 1) $out .= "\n".'<a class="hide" href="http://www.taylorlovett.com" title="Rockville Web Developer, Wordpress Plugins">Wordpress plugin expert and Rockville Web Developer Taylor Lovett</a>';
 
 
1377
 
1378
  if ($form->form_style != 0) {
 
 
 
1379
  $form_styles .= '<style type="text/css">' . "\n";
1380
- $form_styles .= '#' . $form_id . " { width: ".$style->form_width."; padding:".$style->form_padding."; margin:".$style->form_margin."; border:".$style->form_borderwidth." ".$style->form_borderstyle." #".parent::formatStyle($style->form_bordercolor)."; font-family:".$style->form_fontfamily."; }\n";
1381
- $form_styles .= '#' . $form_id . " div { margin-bottom:6px }\n";
1382
- $form_styles .= '#' . $form_id . " div div { margin:0; padding:0; }\n";
1383
- $form_styles .= '#' . $form_id . " h4 { padding:0; margin:".$style->title_margin." ".$style->title_margin." ".$style->title_margin." 0; color:#".parent::formatStyle($style->title_fontcolor)."; font-size:".$style->title_fontsize."; } \n";
1384
- $form_styles .= '#' . $form_id . " label { padding:0; margin:".$style->label_margin." ".$style->label_margin." ".$style->label_margin." 0; display:block; color:#".parent::formatStyle($style->label_fontcolor)."; width:".$style->label_width."; font-size:".$style->label_fontsize."; } \n";
1385
- $form_styles .= '#' . $form_id . " div div input { margin-bottom:2px; line-height:normal; }";
1386
- $form_styles .= '#' . $form_id . " input[type=checkbox] { margin:0; }";
1387
  $form_styles .= '#' . $form_id . " label.checkbox, #" . $form_id . " label.radio, #" . $form_id . " label.select { display:inline; } \n";
1388
- $form_styles .= '#' . $form_id . " input[type=text], #" . $form_id . " select { color:#".parent::formatStyle($style->field_fontcolor)."; margin:0; width:".$style->input_width."; font-size:".$style->field_fontsize."; background-color:#".parent::formatStyle($style->field_backgroundcolor)."; border:1px ".$style->field_borderstyle." #".parent::formatStyle($style->field_bordercolor)."; } \n";
1389
- $form_styles .= '#' . $form_id . " select { width:".$style->dropdown_width."; }\n";
1390
  $form_styles .= '#' . $form_id . " .submit { color:#".parent::formatStyle($style->submit_fontcolor)."; width:".$style->submit_width."; height:".$style->submit_height."; font-size:".$style->submit_fontsize."; } \n";
1391
- $form_styles .= '#' . $form_id . " textarea { color:#".parent::formatStyle($style->field_fontcolor)."; width:".$style->textarea_width."; margin:0; background-color:#".parent::formatStyle($style->textarea_backgroundcolor)."; height:".$style->textarea_height."; font-size:".$style->field_fontsize."; border:1px ".$style->field_borderstyle." #".parent::formatStyle($style->field_bordercolor)."; } \n";
 
 
1392
  $form_styles .= '</style>' . "\n";
1393
  }
1394
 
@@ -1397,11 +549,11 @@ the field names you want required by commas. Remember to use underscores instead
1397
 
1398
  function getCaptchaCode($form_id) {
1399
  $admin_options = $this->getAdminOptions();
1400
- $code_type = ($admin_options[code_type] == 'XHTML') ? ' /' : '';
1401
  $captcha = parent::selectField('', 'captcha');
1402
  $instructions = (empty($captcha->field_instructions)) ? '' : 'title="'.$captcha->field_instructions.'" class="tooltip-field"';
1403
- $out = '<img width="96" height="24" alt="Captcha image for a contact form" id="captcha-image" src="' . get_bloginfo('wpurl') . '/wp-content/plugins/custom-contact-forms/image.php?fid='.$form_id.'"'.$code_type.'>
1404
- <div><label for="captcha'.$form_id.'">* '.$captcha->field_label.'</label> <input type="text" '.$instructions.' name="captcha" id="captcha'.$form_id.'" maxlength="20"'.$code_type.'></div>';
1405
  return $out;
1406
  }
1407
 
@@ -1419,7 +571,7 @@ the field names you want required by commas. Remember to use underscores instead
1419
  $body .= "Message: $message\n";
1420
  $body .= "Message Type: $type\n";
1421
  $body .= 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "\n";
1422
- $mailer = new CustomContactFormsMailer('admin@taylorlovett.com', $email, "CCF Message: $type", stripslashes($body), $admin_options[wp_mail_function], $admin_options[default_to_email]);
1423
  $mailer->send();
1424
  return true;
1425
  }
@@ -1428,11 +580,11 @@ the field names you want required by commas. Remember to use underscores instead
1428
  $admin_options = $this->getAdminOptions();
1429
  if ($this->current_form !== 0) {
1430
  $form = parent::selectForm($this->current_form);
1431
- $success_message = (!empty($form->form_success_message)) ? $form->form_success_message : $admin_options[form_success_message];
1432
- $success_title = (!empty($form->form_success_title)) ? $form->form_success_title : $admin_options[form_success_message_title];
1433
  } else {
1434
- $success_title = $admin_options[form_success_message_title];
1435
- $success_message = (empty($this->current_thank_you_message)) ? $admin_options[form_success_message] : $this->current_thank_you_message;
1436
  } if ($form->form_style != 0) {
1437
  $style = parent::selectStyle($form->form_style);
1438
  ?>
@@ -1451,7 +603,7 @@ the field names you want required by commas. Remember to use underscores instead
1451
  <div id="ccf-form-success">
1452
  <div>
1453
  <h5><?php echo $success_title; ?></h5>
1454
- <a href="javascript:void(0)" class="close">[close]</a>
1455
  </div>
1456
  <p><?php echo $success_message; ?></p>
1457
 
@@ -1470,87 +622,119 @@ the field names you want required by commas. Remember to use underscores instead
1470
  return $array;
1471
  }
1472
 
 
 
 
 
 
 
 
 
 
 
 
1473
  function processForms() {
1474
- if ($_POST[ccf_customhtml]) {
 
 
 
 
 
 
 
1475
  $admin_options = $this->getAdminOptions();
1476
  $fixed_customhtml_fields = array('required_fields', 'success_message', 'thank_you_page', 'destination_email', 'ccf_customhtml');
1477
- $req_fields = $this->requiredFieldsArrayFromList($_POST[required_fields]);
 
1478
  $body = '';
1479
  foreach ($_POST as $key => $value) {
1480
  if (!in_array($key, $fixed_customhtml_fields)) {
1481
- if (in_array($key, $req_fields) && !empty($value))
1482
  unset($req_fields[array_search($key, $req_fields)]);
 
1483
  $body .= ucwords(str_replace('_', ' ', $key)) . ': ' . $value . "\n";
 
1484
  }
1485
  } foreach($req_fields as $err)
1486
- $this->setFormError($err, 'You left the "' . $err . '" field blank.');
1487
  $errors = $this->getAllFormErrors();
1488
  if (empty($errors)) {
 
1489
  require_once('custom-contact-forms-mailer.php');
1490
- $body .= "\n" . 'Form Page: ' . $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'] . "\n" . 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "\n";
1491
- $mailer = new CustomContactFormsMailer($_POST[destination_email], $admin_options[default_from_email], $admin_options[default_form_subject], stripslashes($body), $admin_options[wp_mail_function]);
1492
- $mailer->send();
1493
- if ($_POST[thank_you_page])
1494
- header("Location: " . $_POST[thank_you_page]);
1495
- $this->current_thank_you_message = (!empty($_POST[success_message])) ? $_POST[success_message] : $admin_options[form_success_message];
 
 
 
1496
  $this->current_form = 0;
1497
  add_action('wp_footer', array(&$this, 'insertFormSuccessCode'), 1);
1498
  }
1499
  unset($_POST);
1500
- } elseif ($_POST[customcontactforms_submit]) {
1501
  $this->startSession();
1502
- $this->error_return = $_POST[form_page];
1503
  $admin_options = $this->getAdminOptions();
1504
- $fields = parent::getAttachedFieldsArray($_POST[fid]);
1505
- $form = parent::selectForm($_POST[fid]);
1506
  $checks = array();
1507
- $reply = ($_POST[fixedEmail]) ? $_POST[fixedEmail] : NULL;
1508
- $cap_name = 'captcha_' . $_POST[fid];
1509
  foreach ($fields as $field_id) {
1510
  $field = parent::selectField($field_id, '');
1511
  if ($field->field_slug == 'ishuman') {
1512
- if ($_POST[ishuman] != 1)
1513
- $this->setFormError('ishuman', 'Only humans can use this form.');
1514
  } elseif ($field->field_slug == 'captcha') {
1515
- if ($_POST[captcha] != $_SESSION[$cap_name])
1516
- $this->setFormError('captcha', 'You entered the captcha image code incorrectly');
1517
- } elseif ($field->field_slug == 'fixedEmail' && $field->field_required == 1 && !empty($_POST[fixedEmail])) {
1518
- if (!$this->validEmail($_POST[fixedEmail])) $this->setFormError('bad_email', 'The email address you provided was invalid.');
1519
  } else {
1520
  if ($field->field_required == 1 && empty($_POST[$field->field_slug])) {
1521
  $field_error_label = (empty($field->field_label)) ? $field->field_slug : $field->field_label;
1522
- $this->setFormError($field->field_slug, 'You left the "'.$field_error_label.'" field blank.');
1523
  }
1524
  } if ($field->field_type == 'Checkbox')
1525
  $checks[] = $field->field_slug;
1526
  }
1527
  $body = '';
 
1528
  foreach ($_POST as $key => $value) {
1529
- $_SESSION[fields][$key] = $value;
1530
  $field = parent::selectField('', $key);
1531
- if (!array_key_exists($key, $this->fixed_fields) or $key == 'fixedEmail') {
1532
  $mail_field_label = (empty($field->field_label)) ? $field->field_slug : $field->field_label;
1533
  $body .= $mail_field_label . ': ' . $value . "\n";
 
1534
  } if (in_array($key, $checks)) {
1535
  $checks_key = array_search($key, $checks);
1536
  unset($checks[$checks_key]);
1537
  }
1538
  } foreach ($checks as $check_key) {
1539
  $field = parent::selectField('', $check_key);
1540
- $body .= ucwords(str_replace('_', ' ', $field->field_label)) . ': 0' . "\n";
 
 
1541
  }
1542
  $errors = $this->getAllFormErrors();
1543
  if (empty($errors)) {
1544
- require_once('custom-contact-forms-mailer.php');
1545
- unset($_SESSION['captcha_' . $_POST[fid]]);
1546
- unset($_SESSION[fields]);
1547
- $body .= "\n" . 'Form Page: ' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . "\n" . 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "\n";
1548
- $to_email = (!empty($form->form_email)) ? $form->form_email : $admin_options[default_to_email];
1549
- $mailer = new CustomContactFormsMailer($to_email, $admin_options[default_from_email], $admin_options[default_form_subject], stripslashes($body), $admin_options[wp_mail_function], $reply);
1550
- $mailer->send();
1551
- if (!empty($form->form_thank_you_page)) {
1552
- header("Location: " . $form->form_thank_you_page);
1553
- }
 
 
 
1554
  $this->current_form = $form->id;
1555
  add_action('wp_footer', array(&$this, 'insertFormSuccessCode'), 1);
1556
  }
@@ -1587,13 +771,19 @@ if (!function_exists('CCFWidgetInit')) {
1587
  if (isset($customcontact)) {
1588
  add_action('init', array(&$customcontact, 'init'), 1);
1589
  register_activation_hook(__FILE__, array(&$customcontact, 'activatePlugin'));
1590
- add_action('wp_print_scripts', array(&$customcontact, 'insertFrontEndScripts'), 1);
1591
- add_action('admin_print_scripts', array(&$customcontact, 'insertAdminScripts'), 1);
1592
- add_action('wp_print_styles', array(&$customcontact, 'insertFrontEndStyles'), 1);
1593
- add_action('admin_print_styles', array(&$customcontact, 'insertBackEndStyles'), 1);
 
 
 
 
 
 
 
 
1594
  add_filter('the_content', array(&$customcontact, 'contentFilter'));
1595
  add_action('widgets_init', 'CCFWidgetInit');
1596
- add_action('admin_menu', 'CustomContactForms_ap');
1597
- add_action('admin_footer', array(&$customcontact, 'insertUsagePopover'));
1598
  }
1599
  ?>
2
  /*
3
  Plugin Name: Custom Contact Forms
4
  Plugin URI: http://taylorlovett.com/wordpress-plugins
5
+ Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form.
6
+ Version: 4.0.0.b5
7
  Author: Taylor Lovett
8
  Author URI: http://www.taylorlovett.com
9
  */
10
 
11
  /*
12
+ If you have time to translate this plugin in to your native language, please contact me at
13
+ admin@taylorlovett.com and I will add you as a contributer with your name and website to the
14
+ Wordpress plugin page.
15
+
16
+ Languages: English
17
+
18
  Copyright (C) 2010-2011 Taylor Lovett, taylorlovett.com (admin@taylorlovett.com)
19
  This program is free software; you can redistribute it and/or modify
20
  it under the terms of the GNU General Public License as published by
27
  You should have received a copy of the GNU General Public License
28
  along with this program. If not, see <http://www.gnu.org/licenses/>.
29
  */
30
+ error_reporting(E_ALL ^ E_NOTICE);
31
+ require_once('custom-contact-forms-static.php');
32
+ CustomContactFormsStatic::definePluginConstants();
33
  require_once('custom-contact-forms-db.php');
34
  if (!class_exists('CustomContactForms')) {
35
  class CustomContactForms extends CustomContactFormsDB {
36
  var $adminOptionsName = 'customContactFormsAdminOptions';
37
+ var $form_errors = array();
 
38
  var $error_return;
39
  var $current_form;
40
  var $current_thank_you_message;
41
+ var $current_page = NULL;
 
 
 
 
 
 
42
 
43
  function CustomContactForms() {
44
+ if (is_admin())
45
+ $this->current_page = $_GET['page'];
46
+ }
47
+
48
+ function isPluginAdminPage() {
49
+ return ($this->current_page == 'custom-contact-forms');
50
  }
51
 
52
  function activatePlugin() {
53
  $admin_options = $this->getAdminOptions();
54
+ $admin_options['show_install_popover'] = 1;
55
  update_option($this->adminOptionsName, $admin_options);
56
  parent::createTables();
57
  parent::updateTables();
60
 
61
  function getAdminOptions() {
62
  $admin_email = get_option('admin_email');
63
+ $customcontactAdminOptions = array('show_widget_home' => 1, 'show_widget_pages' => 1, 'show_widget_singles' => 1, 'show_widget_categories' => 1, 'show_widget_archives' => 1, 'default_to_email' => $admin_email, 'default_from_email' => $admin_email, 'default_form_subject' => __('Someone Filled Out Your Contact Form!', 'custom-contact-forms'),
64
+ 'remember_field_values' => 0, 'author_link' => 1, 'enable_widget_tooltips' => 1, 'wp_mail_function' => 1, 'form_success_message_title' => __('Successful Form Submission', 'custom-contact-forms'), 'form_success_message' => __('Thank you for filling out our web form. We will get back to you ASAP.', 'custom-contact-forms'), 'enable_jquery' => 1, 'code_type' => 'XHTML',
65
+ 'show_install_popover' => 0, 'email_form_submissions' => 1, 'admin_ajax' => 1); // default general settings
66
  $customcontactOptions = get_option($this->adminOptionsName);
67
  if (!empty($customcontactOptions)) {
68
  foreach ($customcontactOptions as $key => $option)
75
  if (!is_admin()) {
76
  $this->startSession();
77
  $this->processForms();
78
+ } else {
79
+ $this->downloadExportFile();
80
+ $this->runImport();
81
  }
82
  }
83
 
84
+ function downloadExportFile() {
85
+ if ($_POST['ccf_export']) {
86
+ require_once('custom-contact-forms-export.php');
87
+ $transit = new CustomContactFormsExport($this->adminOptionsName);
88
+ $transit->exportAll();
89
+ $file = $transit->exportToFile();
90
+ wp_redirect(WP_PLUGIN_URL . '/custom-contact-forms/download.php?location=export/' . $file);
91
+ }
92
+ }
93
+
94
+ function runImport() {
95
+ if ($_POST['ccf_clear_import'] || $_POST['ccf_merge_import']) {
96
+ require_once('custom-contact-forms-export.php');
97
+ $transit = new CustomContactFormsExport($this->adminOptionsName);
98
+ $settings['import_general_settings'] = ($_POST['ccf_import_overwrite_settings'] == 1) ? true : false;
99
+ $settings['import_forms'] = ($_POST['ccf_import_forms'] == 1) ? true : false;
100
+ $settings['import_fields'] = ($_POST['ccf_import_fields'] == 1) ? true : false;
101
+ $settings['import_field_options'] = ($_POST['ccf_import_field_options'] == 1) ? true : false;
102
+ $settings['import_styles'] = ($_POST['ccf_import_styles'] == 1) ? true : false;
103
+ $settings['import_saved_submissions'] = ($_POST['ccf_import_saved_submissions'] == 1) ? true : false;
104
+ $settings['mode'] = ($_POST['ccf_clear_import']) ? 'clear_import' : 'merge_import';
105
+ $transit->importFromFile($_FILES['import_file'], $settings);
106
+ wp_redirect('options-general.php?page=custom-contact-forms');
107
  }
108
  }
109
 
110
+ function insertFrontEndStyles() {
111
+ wp_register_style('CCFStandardsCSS', WP_PLUGIN_URL . '/custom-contact-forms/css/custom-contact-forms-standards.css');
112
+ wp_register_style('CCFFormsCSS', WP_PLUGIN_URL . '/custom-contact-forms/css/custom-contact-forms.css');
113
+ wp_enqueue_style('CCFStandardsCSS');
114
+ wp_enqueue_style('CCFFormsCSS');
115
+ }
116
+
117
  function insertBackEndStyles() {
118
+ wp_register_style('CCFStandardsCSS', WP_PLUGIN_URL . '/custom-contact-forms/css/custom-contact-forms-standards.css');
119
+ wp_register_style('CCFAdminCSS', WP_PLUGIN_URL . '/custom-contact-forms/css/custom-contact-forms-admin.css');
120
+ wp_register_style('CCFColorPickerCSS', WP_PLUGIN_URL . '/custom-contact-forms/css/colorpicker.css');
121
  wp_enqueue_style('CCFStandardsCSS');
122
  wp_enqueue_style('CCFAdminCSS');
123
  wp_enqueue_style('CCFColorPickerCSS');
124
  }
125
 
126
  function insertAdminScripts() {
127
+ $admin_options = $this->getAdminOptions();
128
+ ?>
129
+ <script type="text/javascript" language="javascript">
130
+ var attaching = "<?php _e('Attaching', 'custom-contact-forms'); ?>";
131
+ var dettaching = "<?php _e('Dettaching', 'custom-contact-forms'); ?>";
132
+ var saving = "<?php _e('Saving', 'custom-contact-forms'); ?>";
133
+ var more_options = "<?php _e('More Options', 'custom-contact-forms'); ?>";
134
+ var expand = "<?php _e('Expand', 'custom-contact-forms'); ?>";
135
+ var click_to_confirm = "<?php _e('Click to Confirm', 'custom-contact-forms'); ?>";
136
+ var delete_confirm = "<?php _e('Are you sure you want to delete this', 'custom-contact-forms'); ?>";
137
+ var error = "<?php _e('An error has occured. Please try again later.', 'custom-contact-forms'); ?>";
138
+ var ccf_plugin_dir = "<?php echo WP_PLUGIN_URL . '/custom-contact-forms'; ?>";
139
+ var ccf_file = "<?php echo get_option('siteurl') . '/wp-admin/options-general.php?page=custom-contact-forms'; ?>";
140
+ </script>
141
+ <?php
142
+ wp_enqueue_script('jquery');
143
+ wp_enqueue_script('jquery-ui-core');
144
+ wp_enqueue_script('jquery-ui-tabs');
145
+ wp_enqueue_script('jquery-tools', WP_PLUGIN_URL . '/custom-contact-forms/js/jquery.tools.min.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs'), '1.0');
146
+ wp_enqueue_script('ccf-admin-inc', WP_PLUGIN_URL . '/custom-contact-forms/js/custom-contact-forms-admin-inc.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs'), '1.0');
147
+ wp_enqueue_script('ccf-admin', WP_PLUGIN_URL . '/custom-contact-forms/js/custom-contact-forms-admin.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs'), '1.0');
148
+ if ($admin_options['admin_ajax'] == 1)
149
+ wp_enqueue_script('ccf-admin-ajax', WP_PLUGIN_URL . '/custom-contact-forms/js/custom-contact-forms-admin-ajax.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs'), '1.0');
150
+ wp_enqueue_script('ccf-colorpicker', WP_PLUGIN_URL . '/custom-contact-forms/js/colorpicker.js');
151
+ wp_enqueue_script('ccf-eye', WP_PLUGIN_URL . '/custom-contact-forms/js/eye.js');
152
+ wp_enqueue_script('ccf-utils', WP_PLUGIN_URL . '/custom-contact-forms/js/utils.js');
153
+ wp_enqueue_script('ccf-layout', WP_PLUGIN_URL . '/custom-contact-forms/js/layout.js?ver=1.0.2');
154
+ wp_enqueue_script('ccf-pagination', WP_PLUGIN_URL . '/custom-contact-forms/js/jquery.pagination.js');
155
  }
156
 
157
  function insertFrontEndScripts() {
158
  if (!is_admin()) {
159
  $admin_options = $this->getAdminOptions();
160
+ if ($admin_options['enable_jquery'] == 1) {
161
  wp_enqueue_script('jquery');
162
+ wp_enqueue_script('jquery-tools', WP_PLUGIN_URL . '/custom-contact-forms/js/jquery.tools.min.js');
163
+ wp_enqueue_script('ccf-main', WP_PLUGIN_URL . '/custom-contact-forms/js/custom-contact-forms.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-resizable'), '1.0');
 
 
 
 
164
  }
165
  }
166
  }
178
  }
179
 
180
  function insertUsagePopover() {
181
+ require_once('custom-contact-forms-usage-popover.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  }
183
 
184
  function printAdminPage() {
185
  $admin_options = $this->getAdminOptions();
186
+ if ($admin_options['show_install_popover'] == 1) {
187
+ $admin_options['show_install_popover'] = 0;
188
  ?>
189
  <script type="text/javascript" language="javascript">
190
  $j(document).ready(function() {
193
  </script>
194
  <?php
195
  update_option($this->adminOptionsName, $admin_options);
196
+ } if ($_POST['form_create']) {
197
+ parent::insertForm($_POST['form']);
198
+ } elseif ($_POST['field_create']) {
199
+ parent::insertField($_POST['field']);
200
+ } elseif ($_POST['general_settings']) {
201
+ $admin_options['default_to_email'] = $_POST['default_to_email'];
202
+ $admin_options['default_from_email'] = $_POST['default_from_email'];
203
+ $admin_options['default_form_subject'] = $_POST['default_form_subject'];
204
+ $admin_options['show_widget_categories'] = $_POST['show_widget_categories'];
205
+ $admin_options['show_widget_singles'] = $_POST['show_widget_singles'];
206
+ $admin_options['show_widget_pages'] = $_POST['show_widget_pages'];
207
+ $admin_options['show_widget_archives'] = $_POST['show_widget_archives'];
208
+ $admin_options['show_widget_home'] = $_POST['show_widget_home'];
209
+ $admin_options['custom_thank_you'] = $_POST['custom_thank_you'];
210
+ $admin_options['email_form_submissions'] = $_POST['email_form_submissions'];
211
+ $admin_options['author_link'] = $_POST['author_link'];
212
+ $admin_options['admin_ajax'] = $_POST['admin_ajax'];
213
+ $admin_options['enable_jquery'] = $_POST['enable_jquery'];
214
+ $admin_options['code_type'] = $_POST['code_type'];
215
+ $admin_options['form_success_message'] = $_POST['form_success_message'];
216
+ $admin_options['form_success_message_title'] = $_POST['form_success_message_title'];
217
+ $admin_options['wp_mail_function'] = $_POST['wp_mail_function'];
218
+ $admin_options['enable_widget_tooltips'] = $_POST['enable_widget_tooltips'];
219
+ $admin_options['remember_field_values'] = $_POST['remember_field_values'];
220
  update_option($this->adminOptionsName, $admin_options);
221
+ } elseif ($_POST['field_edit']) {
222
+ parent::updateField($_POST['field'], $_POST['fid']);
223
+ } elseif ($_POST['field_delete']) {
224
+ parent::deleteField($_POST['fid']);
225
+ } elseif ($_POST['insert_default_content']) {
226
  parent::insertDefaultContent();
227
+ } elseif ($_POST['form_delete']) {
228
+ parent::deleteForm($_POST['fid']);
229
+ } elseif ($_POST['form_edit']) {
230
+ parent::updateForm($_POST['form'], $_POST['fid']);
231
+ } elseif ($_POST['form_add_field']) {
232
+ parent::addFieldToForm($_POST['attach_object_id'], $_POST['fid']);
233
+ } elseif ($_POST['attach_field_option']) {
234
+ parent::addFieldOptionToField($_POST['attach_object_id'], $_POST['fid']);
235
+ } elseif ($_POST['dettach_field']) {
236
+ parent::dettachField($_POST['dettach_object_id'], $_POST['fid']);
237
+ } elseif ($_POST['dettach_field_option']) {
238
+ parent::dettachFieldOption($_POST['dettach_object_id'], $_POST['fid']);
239
+ } elseif ($_POST['style_create']) {
240
+ parent::insertStyle($_POST['style']);
241
+ } elseif ($_POST['style_edit']) {
242
+ parent::updateStyle($_POST['style'], $_POST['sid']);
243
+ } elseif ($_POST['style_delete']) {
244
+ parent::deleteStyle($_POST['sid']);
245
+ } elseif ($_POST['contact_author']) {
246
  $this_url = (!empty($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : $_SERVER['SERVER_NAME'];
247
+ $this->contactAuthor($_POST['name'], $_POST['email'], $this_url, $_POST['message'], $_POST['type']);
248
+ } elseif ($_POST['delete_field_option']) {
249
+ parent::deleteFieldOption($_POST['oid']);
250
+ } elseif ($_POST['edit_field_option']) {
251
+ parent::updateFieldOption($_POST['option'], $_POST['oid']);
252
+ } elseif ($_POST['create_field_option']) {
253
+ parent::insertFieldOption($_POST['option']);
254
+ } elseif ($_POST['form_submission_delete']) {
255
+ parent::deleteUserData($_POST['uid']);
256
+ } elseif ($_POST['ajax_action']) {
257
+ switch ($_POST['ajax_action']) {
258
+ case 'delete':
259
+ if (empty($_POST['object_id'])) exit;
260
+ switch($_POST['object_type']) {
261
+ case 'form':
262
+ parent::deleteForm($_POST['object_id']);
263
+ break;
264
+ case 'field':
265
+ parent::deleteField($_POST['object_id']);
266
+ break;
267
+ case 'field_option':
268
+ parent::deleteFieldOption($_POST['object_id']);
269
+ break;
270
+ case 'form_submission':
271
+ parent::deleteUserData($_POST['object_id']);
272
+ break;
273
+ case 'style':
274
+ parent::deleteStyle($_POST['object_id']);
275
+ break;
276
+ }
277
+ break;
278
+ case 'create_field_option':
279
+ parent::insertFieldOption($_POST['option']);
280
+ break;
281
+ case 'attach':
282
+ switch ($_POST['object_type']) {
283
+ case 'form':
284
+ parent::addFieldToForm($_POST['attach_object_id'], $_POST['attach_to']);
285
+ break;
286
+ case 'field':
287
+ parent::addFieldOptionToField($_POST['attach_object_id'], $_POST['attach_to']);
288
+ break;
289
+ }
290
+ break;
291
+ case 'dettach':
292
+ //echo '<div style="margin-left:20px;">';
293
+ //print_r($_POST);
294
+ //echo '</div>';
295
+ switch ($_POST['object_type']) {
296
+ case 'form':
297
+ parent::dettachField($_POST['dettach_object_id'], $_POST['dettach_from']);
298
+ break;
299
+ case 'field':
300
+ parent::dettachFieldOption($_POST['dettach_object_id'], $_POST['dettach_from']);
301
+ break;
302
+ }
303
+ break;
304
+ case 'edit':
305
+ if (empty($_POST['object_id'])) exit;
306
+ switch($_POST['object_type']) {
307
+ case 'form':
308
+ if (!empty($_POST['form'])) parent::updateForm($_POST['form'], $_POST['object_id']);
309
+ break;
310
+ case 'field':
311
+ if (!empty($_POST['field'])) parent::updateField($_POST['field'], $_POST['object_id']);
312
+ break;
313
+ case 'field_option':
314
+ if (!empty($_POST['option'])) parent::updateFieldOption($_POST['option'], $_POST['object_id']);
315
+ break;
316
+ case 'style':
317
+ if (!empty($_POST['style'])) parent::updateStyle($_POST['style'], $_POST['object_id']);
318
+ break;
319
+ }
320
+ break;
321
+ }
322
+ exit;
323
+ } elseif ($_GET['clear_tables'] == 1) {
324
+ parent::emptyAllTables();
325
  }
326
+
327
  $styles = parent::selectAllStyles();
328
  $style_options = '<option value="0">Default</option>';
329
  foreach ($styles as $style)
330
  $style_options .= '<option value="'.$style->id.'">'.$style->style_slug.'</option>';
331
+ // Insert plugin admin page XHTML
332
+ require_once('custom-contact-forms-export.php');
333
+ require_once('custom-contact-forms-admin.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  }
335
 
336
  function contentFilter($content) {
337
  $errors = $this->getAllFormErrors();
338
  if (!empty($errors)) {
339
+ $out = '<div id="custom-contact-forms-errors"><p>'.__('You filled out the form incorrectly.', 'custom-contact-forms').'</p><ul>' . "\n";
340
  $errors = $this->getAllFormErrors();
341
  foreach ($errors as $error) {
342
  $out .= '<li>'.$error.'</li>' . "\n";
343
  }
344
+ $err_link = (!empty($this->error_return)) ? '<p><a href="'.$this->error_return.'" title="Go Back">&lt; ' . __('Go Back to Form.', 'custom-contact-forms') . '</a></p>' : '';
345
  return $out . '</ul>' . "\n" . $err_link . '</div>';
346
  }
347
  $matches = array();
387
 
388
  function displayPluginNewsFeed() {
389
  include_once(ABSPATH . WPINC . '/feed.php');
390
+ $rss = @fetch_feed('http://www.taylorlovett.com/category/custom-contact-forms/feed');
391
+ if (!is_wp_error($rss) ) {
392
  $maxitems = $rss->get_item_quantity(5);
393
  $rss_items = $rss->get_items(0, 1);
394
  $rss_items2 = $rss->get_items(1, $maxitems);
395
  }
396
  ?>
397
  <ul>
398
+ <?php if ($maxitems == 0) echo '<li>' . __('Nothing to show.', 'custom-contact-forms') . '</li>';
399
  else
 
400
  foreach ( $rss_items as $item ) : ?>
401
  <li class="first">
402
  <a href='<?php echo $item->get_permalink(); ?>'
403
+ title='<?php echo __('Posted', 'custom-contact-forms'). ' '.$item->get_date('j F Y | g:i a'); ?>'>
404
  <?php echo $item->get_title(); ?></a><br />
405
  <?php echo $item->get_content(); ?>
406
  </li>
407
  <?php endforeach; ?>
408
  <?php if ($maxitems == 0) echo '';
409
  else
 
410
  foreach ( $rss_items2 as $item ) : ?>
411
  <li>
412
  <a href='<?php echo $item->get_permalink(); ?>'
413
+ title='<?php echo __('Posted', 'custom-contact-forms') . ' '.$item->get_date('j F Y | g:i a'); ?>'>
414
  <?php echo $item->get_title(); ?></a><br />
415
  </li>
416
  <?php endforeach; ?>
456
  $style = parent::selectStyle($form->form_style, '');
457
  $style_class = $style->style_slug;
458
  }
459
+ $form_title = CustomContactFormsStatic::decodeOption($form->form_title, 1, 1);
460
  $action = (!empty($form->form_action)) ? $form->form_action : $_SERVER['REQUEST_URI'];
461
  $out .= '<form id="'.$form_id.'" method="'.strtolower($form->form_method).'" action="'.$action.'" class="'.$style_class.'">' . "\n";
462
+ $out .= CustomContactFormsStatic::decodeOption($form->custom_code, 1, 1) . "\n";
463
  if (!empty($form_title)) $out .= '<h4 id="h4-' . $form->id . '-' . $form_key . '">' . $form_title . '</h4>' . "\n";
464
  $fields = parent::getAttachedFieldsArray($fid);
465
  $hiddens = '';
466
+ $code_type = ($admin_options['code_type'] == 'XHTML') ? ' /' : '';
467
  foreach ($fields as $field_id) {
468
  $field = parent::selectField($field_id, '');
469
+ $add_reset = '';
470
  $req = ($field->field_required == 1 or $field->field_slug == 'ishuman') ? '* ' : '';
471
+ $req_long = ($field->field_required == 1) ? ' ' . __('(required)', 'custom-contact-forms') : '';
472
+ $input_id = 'id="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'-'.$form_key.'"';
473
+ $field_value = CustomContactFormsStatic::decodeOption($field->field_value, 1, 1);
474
  $instructions = (empty($field->field_instructions)) ? '' : 'title="' . $field->field_instructions . $req_long . '" class="ccf-tooltip-field"';
475
+ if ($admin_options['enable_widget_tooltips'] == 0 && $is_sidebar) $instructions = '';
476
+ if ($_SESSION['fields'][$field->field_slug]) {
477
+ if ($admin_options['remember_field_values'] == 1)
478
+ $field_value = $_SESSION['fields'][$field->field_slug];
479
+ } if ($field->user_field == 0) {
480
+ if ($field->field_slug == 'captcha') {
481
+ $out .= '<div>' . "\n" . $this->getCaptchaCode($form->id) . "\n" . '</div>' . "\n";
482
+ } elseif ($field->field_slug == 'resetButton') {
483
+ $add_reset = ' <input type="reset" '.$instructions.' class="reset-button '.$field->field_class.'" value="' . $field->field_value . '" />';
484
+ }
485
  } elseif ($field->field_type == 'Text') {
486
  $maxlength = (empty($field->field_maxlength) or $field->field_maxlength <= 0) ? '' : ' maxlength="'.$field->field_maxlength.'"';
487
+ $out .= '<div>'."\n".'<label for="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">'. $req .CustomContactFormsStatic::decodeOption($field->field_label, 1, 1).'</label>'."\n".'<input class="'.$field->field_class.'" '.$instructions.' '.$input_id.' type="text" name="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'" value="'.$field_value.'"'.$maxlength.''.$code_type.'>'."\n".'</div>' . "\n";
488
  } elseif ($field->field_type == 'Hidden') {
489
+ $hiddens .= '<input type="hidden" name="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'" value="'.$field_value.'" '.$input_id.''.$code_type.'>' . "\n";
490
  } elseif ($field->field_type == 'Checkbox') {
491
+ $out .= '<div>'."\n".'<input class="'.$field->field_class.'" '.$instructions.' type="checkbox" name="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'" value="'.CustomContactFormsStatic::decodeOption($field->field_value, 1, 1).'" '.$input_id.''.$code_type.'> '."\n".'<label class="checkbox" for="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">' . $req .CustomContactFormsStatic::decodeOption($field->field_label, 1, 1).'</label>'."\n".'</div>' . "\n";
492
  } elseif ($field->field_type == 'Textarea') {
493
+ $out .= '<div>'."\n".'<label for="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">'. $req .CustomContactFormsStatic::decodeOption($field->field_label, 1, 1).'</label>'."\n".'<textarea class="'.$field->field_class.'" '.$instructions.' '.$input_id.' rows="5" cols="40" name="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">'.$field_value.'</textarea>'."\n".'</div>' . "\n";
494
  } elseif ($field->field_type == 'Dropdown') {
495
  $field_options = '';
496
  $options = parent::getAttachedFieldOptionsArray($field->id);
501
  $field_options .= '<option'.$option_sel.''.$option_value.'>' . $option->option_label . '</option>' . "\n";
502
  }
503
  if (!empty($options)) {
504
+ if (!$is_sidebar) $out .= '<div>'."\n".'<select '.$instructions.' '.$input_id.' name="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'" class="'.$field->field_class.'">'."\n".$field_options.'</select>'."\n".'<label class="checkbox" for="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">'. $req .CustomContactFormsStatic::decodeOption($field->field_label, 1, 1).'</label>'."\n".'</div>' . "\n";
505
+ else $out .= '<div>'."\n".'<label for="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">'. $req .CustomContactFormsStatic::decodeOption($field->field_label, 1, 1).'</label>'."\n".'<select class="'.$field->field_class.'" '.$instructions.' '.$input_id.' name="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">'."\n".$field_options.'</select>'."\n".'</div>' . "\n";
506
  }
507
  } elseif ($field->field_type == 'Radio') {
508
  $field_options = '';
510
  foreach ($options as $option_id) {
511
  $option = parent::selectFieldOption($option_id);
512
  $option_sel = ($field->field_value == $option->option_slug) ? ' checked="checked"' : '';
513
+ $field_options .= '<div><input'.$option_sel.' class="'.$field->field_class.'" type="radio" '.$instructions.' name="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'" value="'.CustomContactFormsStatic::decodeOption($option->option_value, 1, 1).'"'.$code_type.'> <label class="select" for="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">' . CustomContactFormsStatic::decodeOption($option->option_label, 1, 1) . '</label></div>' . "\n";
514
  }
515
+ $field_label = (!empty($field->field_label)) ? '<label for="'.CustomContactFormsStatic::decodeOption($field->field_slug, 1, 1).'">'. $req .CustomContactFormsStatic::decodeOption($field->field_label, 1, 1).'</label>' : '';
516
  if (!empty($options)) $out .= '<div>'."\n".$field_label."\n".$field_options."\n".'</div>' . "\n";
517
  }
518
  }
519
+ $submit_text = (!empty($form->submit_button_text)) ? CustomContactFormsStatic::decodeOption($form->submit_button_text, 1, 0) : 'Submit';
520
+ $out .= '<input name="form_page" value="'.$_SERVER['REQUEST_URI'].'" type="hidden"'.$code_type.'>'."\n".'<input type="hidden" name="fid" value="'.$form->id.'"'.$code_type.'>'."\n".$hiddens."\n".'<input type="submit" id="submit-' . $form->id . '-'.$form_key.'" class="submit" value="' . $submit_text . '" name="customcontactforms_submit"'.$code_type.'>';
521
+ if (!empty($add_reset)) $out .= $add_reset;
522
+ $out .= "\n" . '</form>';
523
+ if ($admin_options['author_link'] == 1) $out .= "\n".'<a class="ccf-hide" href="http://www.taylorlovett.com" title="Rockville Web Developer, Wordpress Plugins">Wordpress plugin expert and Rockville Web Developer Taylor Lovett</a>';
524
 
525
  if ($form->form_style != 0) {
526
+ $no_border = array('', '0', '0px', '0%', '0pt', '0em');
527
+ $round_border = (!in_array($style->field_borderround, $no_border)) ? '-moz-border-radius:'.$style->field_borderround.'; -khtml-border-radius:'.$style->field_borderround.'; -webkit-border-radius:'.$style->field_borderround.'; ' : '';
528
+ $round_border_none = '-moz-border-radius:0px; -khtml-border-radius:0px; -webkit-border-radius:0px; ';
529
  $form_styles .= '<style type="text/css">' . "\n";
530
+ $form_styles .= '#' . $form_id . " { width: ".$style->form_width."; text-align:left; padding:".$style->form_padding."; margin:".$style->form_margin."; border:".$style->form_borderwidth." ".$style->form_borderstyle." #".parent::formatStyle($style->form_bordercolor)."; background-color:#".parent::formatStyle($style->form_backgroundcolor)."; font-family:".$style->form_fontfamily."; } \n";
531
+ $form_styles .= '#' . $form_id . " div { margin-bottom:6px; background-color:inherit; }\n";
532
+ $form_styles .= '#' . $form_id . " div div { margin:0; background-color:inherit; padding:0; }\n";
533
+ $form_styles .= '#' . $form_id . " h4 { padding:0; background-color:inherit; margin:".$style->title_margin." ".$style->title_margin." ".$style->title_margin." 0; color:#".parent::formatStyle($style->title_fontcolor)."; font-size:".$style->title_fontsize."; } \n";
534
+ $form_styles .= '#' . $form_id . " label { padding:0; background-color:inherit; margin:".$style->label_margin." ".$style->label_margin." ".$style->label_margin." 0; display:block; color:#".parent::formatStyle($style->label_fontcolor)."; width:".$style->label_width."; font-size:".$style->label_fontsize."; } \n";
535
+ $form_styles .= '#' . $form_id . " div div input { margin-bottom:2px; line-height:normal; }\n";
536
+ $form_styles .= '#' . $form_id . " input[type=checkbox] { margin:0; }\n";
537
  $form_styles .= '#' . $form_id . " label.checkbox, #" . $form_id . " label.radio, #" . $form_id . " label.select { display:inline; } \n";
538
+ $form_styles .= '#' . $form_id . " input[type=text], #" . $form_id . " select { ".$round_border." color:#".parent::formatStyle($style->field_fontcolor)."; margin:0; width:".$style->input_width."; font-size:".$style->field_fontsize."; background-color:#".parent::formatStyle($style->field_backgroundcolor)."; border:1px ".$style->field_borderstyle." #".parent::formatStyle($style->field_bordercolor)."; } \n";
539
+ $form_styles .= '#' . $form_id . " select { ".$round_border_none." width:".$style->dropdown_width."; }\n";
540
  $form_styles .= '#' . $form_id . " .submit { color:#".parent::formatStyle($style->submit_fontcolor)."; width:".$style->submit_width."; height:".$style->submit_height."; font-size:".$style->submit_fontsize."; } \n";
541
+ $form_styles .= '#' . $form_id . " .reset-button { color:#".parent::formatStyle($style->submit_fontcolor)."; width:".$style->submit_width."; height:".$style->submit_height."; font-size:".$style->submit_fontsize."; } \n";
542
+ $form_styles .= '#' . $form_id . " textarea { ".$round_border." color:#".parent::formatStyle($style->field_fontcolor)."; width:".$style->textarea_width."; margin:0; background-color:#".parent::formatStyle($style->textarea_backgroundcolor)."; font-family:".$style->form_fontfamily."; height:".$style->textarea_height."; font-size:".$style->field_fontsize."; border:1px ".$style->field_borderstyle." #".parent::formatStyle($style->field_bordercolor)."; } \n";
543
+ $form_styles .= '.ccf-tooltip { background-color:#'.parent::formatStyle($style->tooltip_backgroundcolor).'; font-family:'.$style->form_fontfamily.'; font-color:#'.parent::formatStyle($style->tooltip_fontcolor).'; font-size:'.$style->tooltip_fontsize.'; }' . "\n";
544
  $form_styles .= '</style>' . "\n";
545
  }
546
 
549
 
550
  function getCaptchaCode($form_id) {
551
  $admin_options = $this->getAdminOptions();
552
+ $code_type = ($admin_options['code_type'] == 'XHTML') ? ' /' : '';
553
  $captcha = parent::selectField('', 'captcha');
554
  $instructions = (empty($captcha->field_instructions)) ? '' : 'title="'.$captcha->field_instructions.'" class="tooltip-field"';
555
+ $out = '<img width="96" height="24" alt="' . __('Captcha image for Custom Contact Forms plugin. You must type the numbers shown in the image', 'custom-contact-forms') . '" id="captcha-image" src="' . get_bloginfo('wpurl') . '/wp-content/plugins/custom-contact-forms/image.php?fid='.$form_id.'"'.$code_type.'>
556
+ <div><label for="captcha'.$form_id.'">* '.$captcha->field_label.'</label> <input class="'.$captcha->field_class.'" type="text" '.$instructions.' name="captcha" id="captcha'.$form_id.'" maxlength="20"'.$code_type.'></div>';
557
  return $out;
558
  }
559
 
571
  $body .= "Message: $message\n";
572
  $body .= "Message Type: $type\n";
573
  $body .= 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "\n";
574
+ $mailer = new CustomContactFormsMailer('admin@taylorlovett.com', $email, "CCF Message: $type", stripslashes($body), $admin_options['wp_mail_function']);
575
  $mailer->send();
576
  return true;
577
  }
580
  $admin_options = $this->getAdminOptions();
581
  if ($this->current_form !== 0) {
582
  $form = parent::selectForm($this->current_form);
583
+ $success_message = (!empty($form->form_success_message)) ? $form->form_success_message : $admin_options['form_success_message'];
584
+ $success_title = (!empty($form->form_success_title)) ? $form->form_success_title : $admin_options['form_success_message_title'];
585
  } else {
586
+ $success_title = $admin_options['form_success_message_title'];
587
+ $success_message = (empty($this->current_thank_you_message)) ? $admin_options['form_success_message'] : $this->current_thank_you_message;
588
  } if ($form->form_style != 0) {
589
  $style = parent::selectStyle($form->form_style);
590
  ?>
603
  <div id="ccf-form-success">
604
  <div>
605
  <h5><?php echo $success_title; ?></h5>
606
+ <a href="javascript:void(0)" class="close">&times;</a>
607
  </div>
608
  <p><?php echo $success_message; ?></p>
609
 
622
  return $array;
623
  }
624
 
625
+ function appendToActionLinks($action_links, $plugin_file) {
626
+ static $link_added = false;
627
+ if (!$link_added && basename($plugin_file) == 'custom-contact-forms.php') {
628
+ $new_link = '<a style="font-weight:bold;" href="options-general.php?page=custom-contact-forms" title="' . __('Manage Custom Contact Forms', 'custom-contact-forms') . '">' . __('Settings', 'custom-contact-forms') . '</a>';
629
+ array_unshift($action_links, $new_link);
630
+ $link_added = true;
631
+ }
632
+ return $action_links;
633
+ }
634
+
635
+
636
  function processForms() {
637
+ if ($_POST['ccf_customhtml'] || $_POST['customcontactforms_submit']) {
638
+ // BEGIN define common language vars
639
+ $lang = array();
640
+ $lang['field_blank'] = __('You left this field blank: ', 'custom-contact-forms');
641
+ $lang['form_page'] = __('Form Displayed on Page: ', 'custom-contact-forms');
642
+ $lang['sender_ip'] = __('Sender IP: ', 'custom-contact-forms');
643
+ // END define common language vars
644
+ } if ($_POST['ccf_customhtml']) {
645
  $admin_options = $this->getAdminOptions();
646
  $fixed_customhtml_fields = array('required_fields', 'success_message', 'thank_you_page', 'destination_email', 'ccf_customhtml');
647
+ $req_fields = $this->requiredFieldsArrayFromList($_POST['required_fields']);
648
+ $req_fields = array_map('trim', $req_fields);
649
  $body = '';
650
  foreach ($_POST as $key => $value) {
651
  if (!in_array($key, $fixed_customhtml_fields)) {
652
+ if (in_array($key, $req_fields) && !empty($value)) {
653
  unset($req_fields[array_search($key, $req_fields)]);
654
+ }
655
  $body .= ucwords(str_replace('_', ' ', $key)) . ': ' . $value . "\n";
656
+ $data_array[$key] = $value;
657
  }
658
  } foreach($req_fields as $err)
659
+ $this->setFormError($err, $lang['field_blank'] . '"' . $err . '"');
660
  $errors = $this->getAllFormErrors();
661
  if (empty($errors)) {
662
+ require_once('custom-contact-forms-user-data.php');
663
  require_once('custom-contact-forms-mailer.php');
664
+ $data_object = new CustomContactFormsUserData(array('data_array' => $data_array, 'form_page' => $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'], 'form_id' => 0, 'data_time' => time()));
665
+ parent::insertUserData($data_object);
666
+ $body .= "\n" . $lang['form_page'] . $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'] . "\n" . $lang['sender_ip'] . $_SERVER['REMOTE_ADDR'] . "\n";
667
+ if ($admin_options['email_form_submissions'] == 1) {
668
+ $mailer = new CustomContactFormsMailer($_POST['destination_email'], $admin_options['default_from_email'], $admin_options['default_form_subject'], stripslashes($body), $admin_options['wp_mail_function']);
669
+ $mailer->send();
670
+ } if ($_POST['thank_you_page'])
671
+ CustomContactFormsStatic::redirect($_POST['thank_you_page']);
672
+ $this->current_thank_you_message = (!empty($_POST['success_message'])) ? $_POST['success_message'] : $admin_options['form_success_message'];
673
  $this->current_form = 0;
674
  add_action('wp_footer', array(&$this, 'insertFormSuccessCode'), 1);
675
  }
676
  unset($_POST);
677
+ } elseif ($_POST['customcontactforms_submit']) {
678
  $this->startSession();
679
+ $this->error_return = $_POST['form_page'];
680
  $admin_options = $this->getAdminOptions();
681
+ $fields = parent::getAttachedFieldsArray($_POST['fid']);
682
+ $form = parent::selectForm($_POST['fid']);
683
  $checks = array();
684
+ $reply = ($_POST['fixedEmail']) ? $_POST['fixedEmail'] : NULL;
685
+ $cap_name = 'captcha_' . $_POST['fid'];
686
  foreach ($fields as $field_id) {
687
  $field = parent::selectField($field_id, '');
688
  if ($field->field_slug == 'ishuman') {
689
+ if ($_POST['ishuman'] != 1)
690
+ $this->setFormError('ishuman', __('Only humans can use this form.', 'custom-contact-forms'));
691
  } elseif ($field->field_slug == 'captcha') {
692
+ if ($_POST['captcha'] != $_SESSION[$cap_name])
693
+ $this->setFormError('captcha', __('You copied the number from the captcha field incorrectly.', 'custom-contact-forms'));
694
+ } elseif ($field->field_slug == 'fixedEmail' && $field->field_required == 1 && !empty($_POST['fixedEmail'])) {
695
+ if (!$this->validEmail($_POST['fixedEmail'])) $this->setFormError('bad_email', __('The email address you provided is not valid.', 'custom-contact-forms'));
696
  } else {
697
  if ($field->field_required == 1 && empty($_POST[$field->field_slug])) {
698
  $field_error_label = (empty($field->field_label)) ? $field->field_slug : $field->field_label;
699
+ $this->setFormError($field->field_slug, $lang['field_blank'] . '"'.$field_error_label.'"');
700
  }
701
  } if ($field->field_type == 'Checkbox')
702
  $checks[] = $field->field_slug;
703
  }
704
  $body = '';
705
+ $data_array = array();
706
  foreach ($_POST as $key => $value) {
707
+ $_SESSION['fields'][$key] = $value;
708
  $field = parent::selectField('', $key);
709
+ if (!array_key_exists($key, $GLOBALS['ccf_fixed_fields']) or $key == 'fixedEmail') {
710
  $mail_field_label = (empty($field->field_label)) ? $field->field_slug : $field->field_label;
711
  $body .= $mail_field_label . ': ' . $value . "\n";
712
+ $data_array[$key] = $value;
713
  } if (in_array($key, $checks)) {
714
  $checks_key = array_search($key, $checks);
715
  unset($checks[$checks_key]);
716
  }
717
  } foreach ($checks as $check_key) {
718
  $field = parent::selectField('', $check_key);
719
+ $lang['not_checked'] = __('Not Checked', 'custom-contact-forms');
720
+ $data_array[$check_key] = $lang['not_checked'];
721
+ $body .= ucwords(str_replace('_', ' ', $field->field_label)) . ': ' . $lang['not_checked'] . "\n";
722
  }
723
  $errors = $this->getAllFormErrors();
724
  if (empty($errors)) {
725
+ require_once('custom-contact-forms-user-data.php');
726
+ unset($_SESSION['captcha_' . $_POST['fid']]);
727
+ unset($_SESSION['fields']);
728
+ $data_object = new CustomContactFormsUserData(array('data_array' => $data_array, 'form_page' => $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], 'form_id' => $form->id, 'data_time' => time()));
729
+ parent::insertUserData($data_object);
730
+ if ($admin_options['email_form_submission'] == 1) {
731
+ require_once('custom-contact-forms-mailer.php');
732
+ $body .= "\n" . $lang['form_page'] . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . "\n" . $lang['sender_ip'] . $_SERVER['REMOTE_ADDR'] . "\n";
733
+ $to_email = (!empty($form->form_email)) ? $form->form_email : $admin_options['default_to_email'];
734
+ $mailer = new CustomContactFormsMailer($to_email, $admin_options['default_from_email'], $admin_options['default_form_subject'], stripslashes($body), $admin_options['wp_mail_function'], $reply);
735
+ $mailer->send();
736
+ } if (!empty($form->form_thank_you_page))
737
+ CustomContactFormsStatic::redirect($form->form_thank_you_page);
738
  $this->current_form = $form->id;
739
  add_action('wp_footer', array(&$this, 'insertFormSuccessCode'), 1);
740
  }
771
  if (isset($customcontact)) {
772
  add_action('init', array(&$customcontact, 'init'), 1);
773
  register_activation_hook(__FILE__, array(&$customcontact, 'activatePlugin'));
774
+ if (is_admin()) {
775
+ if ($customcontact->isPluginAdminPage()) {
776
+ add_action('admin_print_styles', array(&$customcontact, 'insertBackEndStyles'), 1);
777
+ add_action('admin_print_scripts', array(&$customcontact, 'insertAdminScripts'), 1);
778
+ add_action('admin_footer', array(&$customcontact, 'insertUsagePopover'));
779
+ }
780
+ add_filter('plugin_action_links', array(&$customcontact,'appendToActionLinks'), 10, 2);
781
+ add_action('admin_menu', 'CustomContactForms_ap');
782
+ } else {
783
+ add_action('wp_print_scripts', array(&$customcontact, 'insertFrontEndScripts'), 1);
784
+ add_action('wp_print_styles', array(&$customcontact, 'insertFrontEndStyles'), 1);
785
+ }
786
  add_filter('the_content', array(&$customcontact, 'contentFilter'));
787
  add_action('widgets_init', 'CCFWidgetInit');
 
 
788
  }
789
  ?>
download.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Custom Contact Forms Plugin
4
+ By Taylor Lovett - http://www.taylorlovett.com
5
+ Plugin URL: http://www.taylorlovett.com/wordpress-plugins
6
+ */
7
+ error_reporting(0);
8
+ if (!empty($_GET['location']) && preg_match('/^export\/ccf[^\/^\.]+\.sql$/i', $_GET['location'])) {
9
+ header('Content-Description: File Transfer');
10
+ header('Content-Type: application/octet-stream');
11
+ header('Content-Disposition: attachment; filename=' . basename($_GET['location']));
12
+ header('Content-Transfer-Encoding: binary');
13
+ header('Expires: 0');
14
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
15
+ header('Pragma: public');
16
+ header('Content-Length: ' . filesize($_GET['location']));
17
+ ob_clean();
18
+ flush();
19
+ echo file_get_contents($_GET['location']);
20
+ }
21
+ exit();
22
+ ?>
export/index.htm ADDED
File without changes
images/wpspin_light.gif ADDED
Binary file
import/index.htm ADDED
File without changes
js/custom-contact-forms-admin-ajax.js ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $j.preloadImages(ccf_plugin_dir + "/images/wpspin_light.gif"); // preload loading image
2
+ $j(document).ready(function() {
3
+ $j(".delete-button").each(function(){
4
+ var name = $j(this).attr('name');
5
+ var value = $j(this).attr('value');
6
+ var html = '<input class="delete-button" type="button" name="'+name+'" value="'+value+'" />';
7
+ $j(this).after(html).remove(); // add new, then remove original input
8
+ });
9
+ $j(".delete-button").live("click", function(event) {
10
+ var object_id = $j(this).parents().find(".object-id").attr("value");
11
+ var object_type = $j(this).parents().find(".object-type").attr("value");
12
+ var parent_row = $j(this).parents("tr:eq(0)");
13
+ var modal = fx.initModal();
14
+ $j("<a>")
15
+ .attr("href", "#")
16
+ .addClass("modal-close-btn")
17
+ .html("&times")
18
+ .click(function(event) { fx.boxOut(event); })
19
+ .appendTo(modal);
20
+ $j("<p>")
21
+ .html(delete_confirm + " " + object_type.replace("_", " ") + "?")
22
+ .appendTo(modal);
23
+ $j("<input>").attr({
24
+ type: "button",
25
+ value: click_to_confirm
26
+ }).addClass("delete-button-confirm").appendTo(modal);
27
+ var loading_img = $j("<img>")
28
+ .attr("src", ccf_plugin_dir + '/images/wpspin_light.gif')
29
+ .addClass("modal-wpspin")
30
+ .appendTo(modal)
31
+ .hide();
32
+ //var option_pattern = RegExp('<option value="' + object_id + '">.*?<\/option>', "i");
33
+ $j(".delete-button-confirm").click(function() {
34
+ loading_img.show();
35
+ $j.ajax({
36
+ type: "POST",
37
+ url: ccf_file,
38
+ data: "ajax_action=delete&object_id=" + object_id + "&object_type=" + object_type,
39
+ success: function(data) {
40
+ if (object_type == "form" || object_type == "field" || object_type == "form_submission")
41
+ parent_row.next().remove();
42
+ if (object_type == "style") {
43
+ /* delete occurences of this option within style dropdowns. */
44
+ var style_inputs = $j(".form_style_input");
45
+ style_inputs.each(function() {
46
+ this_option = $j(this).find("option[value=" + object_id + "]");
47
+ if (this_option.attr("selected") == "selected")
48
+ $j(this).find("option[value=0]").attr("selected", "selected");
49
+ this_option.remove();
50
+ });
51
+ } else if (object_type == "field" || object_type == "field_option") {
52
+ /* delete occurences of this option within field and field option attach dropdowns. */
53
+ var fields_options_input = $j("select[name=attach_object_id], select[name=dettach_object_id]");
54
+ fields_options_input.each(function () {
55
+ this_option = $j(this).find("option[value=" + object_id + "]");
56
+ this_option.remove();
57
+ });
58
+ }
59
+ parent_row.remove();
60
+ },
61
+ error: function() { modal.append(error); },
62
+ complete: function() { modal.remove(); }
63
+ });
64
+ });
65
+ });
66
+ $j(".edit-button").each(function(){
67
+ var name = $j(this).attr('name');
68
+ var value = $j(this).attr('value');
69
+ var html = '<input class="edit-button" type="button" name="'+name+'" value="'+value+'" />';
70
+ $j(this).after(html).remove(); // add new, then remove original input
71
+ });
72
+ $j(".edit-button").live("click", function(event) {
73
+ save_box = fx.initSaveBox("Saving");
74
+ var object_id = $j(this).parents().find(".object-id").attr("value");
75
+ var object_type = $j(this).parents().find(".object-type").attr("value");
76
+ var values = "object_id=" + object_id + "&object_type=" + object_type + "&ajax_action=edit";
77
+ var object_rows = $j(this).parents("tr:eq(0)");
78
+ if (object_type == "form" || object_type == "field")
79
+ object_rows = object_rows.add(object_rows.next());
80
+ object_rows.find("input, select, textarea").each(function() {
81
+ if ($j(this).attr("name").match(/\[/) && $j(this).attr("type") != "submit" && $j(this).attr("type") != "button") {
82
+ key = $j(this).attr("name");;
83
+ values = values + "&" + key + "=" + $j(this).attr("value");
84
+ }
85
+ });
86
+ $j.ajax({
87
+ type: "POST",
88
+ url: ccf_file,
89
+ data: values,
90
+ //success: function(data) {
91
+ //$j(".save-box").fadeOut().remove();
92
+ //},
93
+ error: function() { alert(error); },
94
+ complete: function() { $j(".save-box").fadeOut().remove(); }
95
+ });
96
+ });
97
+
98
+ $j(".attach-button").each(function(){
99
+ var name = $j(this).attr('name');
100
+ var value = $j(this).attr('value');
101
+ var html = '<input class="attach-button" type="button" name="' + name + '" value="' + value + '" />';
102
+ $j(this).after(html).remove(); // add new, then remove original input
103
+ });
104
+ $j(".attach-button").live("click", function() {
105
+ var object_type = $j(this).parents().find(".object-type").attr("value");
106
+ var attach_object_field = $j(this).parents().find("select[name=attach_object_id]:first");
107
+ var object_id = attach_object_field.attr("class").split(' ')[0].replace(/[^0-9]*([0-9]*)/, "$1");
108
+ var dettach_object_field = $j(this).parents().find("select[name=dettach_object_id]:first");
109
+ var attach_object_id = attach_object_field.attr("value");
110
+ var attach_object_slug = attach_object_field.find("option[value=" + attach_object_id + "]:eq(0)").first().text();
111
+ pattern = new RegExp('<option value="' + attach_object_id + '">', "i");
112
+ str = dettach_object_field.html();
113
+ if (!str.match(pattern)) {
114
+ var save_box = fx.initSaveBox(attaching);
115
+ $j.ajax({
116
+ type: "POST",
117
+ url: ccf_file,
118
+ data: "ajax_action=attach&attach_object_id=" + attach_object_id + "&attach_to=" + object_id + "&object_type=" + object_type,
119
+ success: function(data) {
120
+ //debug = fx.initDebugWindow();
121
+ //$j("<div></div>").html(data).appendTo(debug);
122
+ new_option = $j("<option></option>").attr("value", attach_object_id).text(attach_object_slug);
123
+ dettach_object_field.append(new_option);
124
+ dettach_object_field.find('option[value=-1]').remove();
125
+
126
+ },
127
+ error: function() { alert(error); },
128
+ complete: function() { $j(".save-box").fadeOut().remove(); }
129
+ });
130
+ }
131
+ });
132
+
133
+ $j(".dettach-button").each(function(){
134
+ var name = $j(this).attr('name');
135
+ var value = $j(this).attr('value');
136
+ var html = '<input class="dettach-button" type="button" name="' + name + '" value="' + value + '" />';
137
+ $j(this).after(html).remove(); // add new, then remove original input
138
+ });
139
+ $j(".dettach-button").live("click", function() {
140
+ var object_type = $j(this).parents().find(".object-type").attr("value");
141
+ var dettach_object_field = $j(this).parents().find("select[name=dettach_object_id]:first");
142
+ var object_id = dettach_object_field.attr("class").split(' ')[0].replace(/[^0-9]*([0-9]*)/, "$1");
143
+ var dettach_object_id = dettach_object_field.attr("value");
144
+ if (dettach_object_id != "-1") {
145
+ var dettach_object_slug = dettach_object_field.find("option[value=" + dettach_object_id + "]:eq(0)").first().text();
146
+ var save_box = fx.initSaveBox(dettaching);
147
+ $j.ajax({
148
+ type: "POST",
149
+ url: ccf_file,
150
+ data: "ajax_action=dettach&dettach_object_id=" + dettach_object_id + "&dettach_from=" + object_id + "&object_type=" + object_type,
151
+ success: function(data) {
152
+ //debug = fx.initDebugWindow();
153
+ //$j("<div></div>").html(data).appendTo(debug);
154
+ pattern = new RegExp('<option value="' + dettach_object_id + '">.*?<\/option>', "i");
155
+ new_options = dettach_object_field.html().replace(pattern, '');
156
+ if (!new_options.match(/<\/option>/)) new_options = '<option value="-1">Nothing Attached!</option>';
157
+ dettach_object_field.html(new_options);
158
+ },
159
+ error: function() { alert(error); },
160
+ complete: function() { $j(".save-box").fadeOut().remove(); }
161
+ });
162
+ }
163
+ });
164
+ /*
165
+ $j(".create-button").each(function(){
166
+ var name = $j(this).attr('name');
167
+ var value = $j(this).attr('value');
168
+ var html = '<input class="create-button" type="button" name="'+name+'" value="'+value+'" />';
169
+ $j(this).after(html).remove(); // add new, then remove original input
170
+ });
171
+ $j(".create-button").live("click", function(event) {
172
+ var icon = fx.getLoadingIcon().insertBefore(this);
173
+ var object_type = $j(this).parents().find("input[name=object_type]").attr("value");
174
+ if (object_type == "field_option") {
175
+ var values = "ajax_action=create_field_option";
176
+ var value_array = [];
177
+ var new_row = $j('#edit-field-options tr:first').clone(true).addClass("new-object").hide().insertBefore('#edit-field-options tr:first');
178
+ $j(this).parents("form:eq(0)").find("input").each(function() {
179
+ if ($j(this).attr("name").match(/^option\[/)) {
180
+ values = values + "&" + $j(this).attr("name") + "=" + $j(this).attr("value");
181
+ key = $j(this).attr("name").replace(/^option\[(.*)\]$/, "$1");
182
+ value_array[key] = $j(this).attr("value");
183
+ $j(".new-object input[name=\"option[" + key + "]\"]").attr("value", value_array[key]);
184
+ }
185
+ });
186
+ // Try to get first row of field options table to use its html as a framework for new row
187
+ }
188
+ //new_row = $j("#edit-field-options tr:first").html().appendTo("body").hide();
189
+
190
+ // Create generic class of objects/functions to add delete/edit/insert capabilities on certain tables
191
+ $j.ajax({
192
+ type: "POST",
193
+ url: ccf_file,
194
+ data: values,
195
+ success: function(data) {
196
+
197
+ },
198
+ error: function() {
199
+ alert("An error has occured, please try again later.");
200
+ }
201
+ });
202
+ new_row.fadeIn("slow").removeClass("new-object");
203
+ $j(".ccf-loading-icon").remove();
204
+ });*/
205
+ });
js/custom-contact-forms-admin-inc.js ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var $j = jQuery.noConflict();
2
+
3
+ function showCCFUsagePopover() {
4
+ $j("#ccf-usage-popover").fadeIn('slow');
5
+ }
6
+
7
+ (function($j) {
8
+ var cache = [];
9
+ // Arguments are image paths relative to the current page.
10
+ $j.preloadImages = function() {
11
+ var args_len = arguments.length;
12
+ for (var i = args_len; i--;) {
13
+ var cacheImage = document.createElement('img');
14
+ cacheImage.src = arguments[i];
15
+ cache.push(cacheImage);
16
+ }
17
+ }
18
+ })(jQuery)
19
+
20
+ var fx = {
21
+ "initModal" : function() {
22
+ if ($j(".modal-window").length == 0) {
23
+ return $j("<div>")
24
+ .addClass("modal-window")
25
+ .appendTo("body");
26
+ } else {
27
+ return $j(".modal-window");
28
+ }
29
+ },
30
+
31
+ "initDebugWindow" : function() {
32
+ if ($j(".debug-window").length == 0) {
33
+ debug = $j("<div>").addClass("debug-window").appendTo("body");
34
+ debug.click(function() { debug.remove(); });
35
+ return debug;
36
+ } else {
37
+ return $j(".debug-window");
38
+ }
39
+ },
40
+
41
+ "initSaveBox" : function(text) {
42
+ if ($j(".save-box").length == 0) {
43
+ box = $j("<div>").addClass("save-box").appendTo("body");
44
+ $j("<a>")
45
+ .attr("href", "#")
46
+ .addClass("save-box-close-btn")
47
+ .html("&times;")
48
+ .click(function(event) { event.preventDefault(); $j(".save-box").fadeOut("slow"); })
49
+ .appendTo(box);
50
+ $j("<p>").html(text + ' <img src="' + ccf_plugin_dir + '/images/wpspin_light.gif" />').appendTo(".save-box");
51
+ return box;
52
+ } else {
53
+ return $j(".save-box");
54
+ }
55
+ },
56
+
57
+ "boxOut": function(event) {
58
+ if (event != undefined) event.preventDefault();
59
+ $j(".modal-window").fadeOut("slow", function() { $j(this).remove(); });
60
+ }
61
+ };
js/custom-contact-forms-admin.js CHANGED
@@ -1,11 +1,7 @@
1
- function showCCFUsagePopover() {
2
- $j("#ccf-usage-popover").delay(500).fadeIn('slow');
3
- }
4
-
5
- var $j = jQuery.noConflict();
6
  $j(document).ready(function(){
 
7
  $j('.form-extra-options').hide();
8
- $j('.form-options-expand').prepend('<input type="button" class="form-options-expand-link" value="More Options" />');
9
  $j('.form-options-expand-link').click(function() {
10
  $j(this)
11
  .parent()
@@ -16,8 +12,20 @@ $j(document).ready(function(){
16
  .toggle();
17
  });
18
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  $j('.fixed-fields-extra-options').hide();
20
- $j('.fixed-fields-options-expand').prepend('<input type="button" class="fixed-fields-options-expand-link" value="More Options" />');
21
  $j('.fixed-fields-options-expand-link').click(function() {
22
  $j(this)
23
  .parent()
@@ -29,7 +37,7 @@ $j(document).ready(function(){
29
  });
30
 
31
  $j('.fields-extra-options').hide();
32
- $j('.fields-options-expand').prepend('<input type="button" class="fields-options-expand-link" value="More Options" />');
33
  $j('.fields-options-expand-link').click(function() {
34
  $j(this)
35
  .parent()
@@ -45,4 +53,12 @@ $j(document).ready(function(){
45
  $j("#ccf-usage-popover .close").click(function() {
46
  $j("#ccf-usage-popover").fadeOut();
47
  });
 
 
 
 
 
 
 
 
48
  });
 
 
 
 
 
1
  $j(document).ready(function(){
2
+
3
  $j('.form-extra-options').hide();
4
+ $j('.form-options-expand').prepend('<input type="button" class="form-options-expand-link" value="' + more_options + '" />');
5
  $j('.form-options-expand-link').click(function() {
6
  $j(this)
7
  .parent()
12
  .toggle();
13
  });
14
 
15
+ $j('.submission-content').hide();
16
+ $j('.submission-content-expand').prepend('<input type="button" class="submission-content-expand-button" value="' + expand + '" />');
17
+ $j('.submission-content-expand-button').click(function() {
18
+ $j(this)
19
+ .parent()
20
+ .parent()
21
+ .parent()
22
+ .parent()
23
+ .next()
24
+ .toggle();
25
+ });
26
+
27
  $j('.fixed-fields-extra-options').hide();
28
+ $j('.fixed-fields-options-expand').prepend('<input type="button" class="fixed-fields-options-expand-link" value="' + more_options + '" />');
29
  $j('.fixed-fields-options-expand-link').click(function() {
30
  $j(this)
31
  .parent()
37
  });
38
 
39
  $j('.fields-extra-options').hide();
40
+ $j('.fields-options-expand').prepend('<input type="button" class="fields-options-expand-link" value="' + more_options + '" />');
41
  $j('.fields-options-expand-link').click(function() {
42
  $j(this)
43
  .parent()
53
  $j("#ccf-usage-popover .close").click(function() {
54
  $j("#ccf-usage-popover").fadeOut();
55
  });
56
+
57
+ $j("a[title].toollink").tooltip({
58
+ position: "bottom left",
59
+ offset: [-2, 10],
60
+ effect: "fade",
61
+ tipClass: 'ccf-tooltip',
62
+ opacity: 1.0
63
+ });
64
  });
js/custom-contact-forms.js CHANGED
@@ -8,10 +8,6 @@ function storePopupVar(form_id) {
8
  var $j = jQuery.noConflict();
9
 
10
  $j(document).ready(function(){
11
- /*$j('<div></div>')
12
- .prependTo('body')
13
- .attr('id', 'ccf-popover')
14
- .load('wp-content/plugins/custom-contact-forms/custom-contact-forms-popover.php');*/
15
  $j('<a></a>')
16
  .addClass('ccf-popover-close')
17
  .html('[close]')
@@ -33,7 +29,8 @@ $j(document).ready(function(){
33
  position: "center right",
34
  offset: [-2, 10],
35
  effect: "fade",
36
- opacity: 0.7
 
37
 
38
  });
39
 
8
  var $j = jQuery.noConflict();
9
 
10
  $j(document).ready(function(){
 
 
 
 
11
  $j('<a></a>')
12
  .addClass('ccf-popover-close')
13
  .html('[close]')
29
  position: "center right",
30
  offset: [-2, 10],
31
  effect: "fade",
32
+ opacity: 0.7,
33
+ tipClass: 'ccf-tooltip'
34
 
35
  });
36
 
js/jquery.pagination.js ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This jQuery plugin displays pagination links inside the selected elements.
3
+ *
4
+ * This plugin needs at least jQuery 1.4.2
5
+ *
6
+ * @author Gabriel Birke (birke *at* d-scribe *dot* de)
7
+ * @version 2.0rc
8
+ * @param {int} maxentries Number of entries to paginate
9
+ * @param {Object} opts Several options (see README for documentation)
10
+ * @return {Object} jQuery Object
11
+ */
12
+ (function($){
13
+ /**
14
+ * @class Class for calculating pagination values
15
+ */
16
+ $.PaginationCalculator = function(maxentries, opts) {
17
+ this.maxentries = maxentries;
18
+ this.opts = opts;
19
+ }
20
+
21
+ $.extend($.PaginationCalculator.prototype, {
22
+ /**
23
+ * Calculate the maximum number of pages
24
+ * @method
25
+ * @returns {Number}
26
+ */
27
+ numPages:function() {
28
+ return Math.ceil(this.maxentries/this.opts.items_per_page);
29
+ },
30
+ /**
31
+ * Calculate start and end point of pagination links depending on
32
+ * current_page and num_display_entries.
33
+ * @returns {Array}
34
+ */
35
+ getInterval:function(current_page) {
36
+ var ne_half = Math.ceil(this.opts.num_display_entries/2);
37
+ var np = this.numPages();
38
+ var upper_limit = np - this.opts.num_display_entries;
39
+ var start = current_page > ne_half ? Math.max( Math.min(current_page - ne_half, upper_limit), 0 ) : 0;
40
+ var end = current_page > ne_half?Math.min(current_page+ne_half, np):Math.min(this.opts.num_display_entries, np);
41
+ return {start:start, end:end};
42
+ }
43
+ });
44
+
45
+ // Initialize jQuery object container for pagination renderers
46
+ $.PaginationRenderers = {}
47
+
48
+ /**
49
+ * @class Default renderer for rendering pagination links
50
+ */
51
+ $.PaginationRenderers.defaultRenderer = function(maxentries, opts) {
52
+ this.maxentries = maxentries;
53
+ this.opts = opts;
54
+ this.pc = new $.PaginationCalculator(maxentries, opts);
55
+ }
56
+ $.extend($.PaginationRenderers.defaultRenderer.prototype, {
57
+ /**
58
+ * Helper function for generating a single link (or a span tag if it's the current page)
59
+ * @param {Number} page_id The page id for the new item
60
+ * @param {Number} current_page
61
+ * @param {Object} appendopts Options for the new item: text and classes
62
+ * @returns {jQuery} jQuery object containing the link
63
+ */
64
+ createLink:function(page_id, current_page, appendopts){
65
+ var lnk, np = this.pc.numPages();
66
+ page_id = page_id<0?0:(page_id<np?page_id:np-1); // Normalize page id to sane value
67
+ appendopts = $.extend({text:page_id+1, classes:""}, appendopts||{});
68
+ if(page_id == current_page){
69
+ lnk = $("<span class='current'>" + appendopts.text + "</span>");
70
+ }
71
+ else
72
+ {
73
+ lnk = $("<a>" + appendopts.text + "</a>")
74
+ .attr('href', this.opts.link_to.replace(/__id__/,page_id));
75
+ }
76
+ if(appendopts.classes){ lnk.addClass(appendopts.classes); }
77
+ lnk.data('page_id', page_id);
78
+ return lnk;
79
+ },
80
+ // Generate a range of numeric links
81
+ appendRange:function(container, current_page, start, end) {
82
+ var i;
83
+ for(i=start; i<end; i++) {
84
+ this.createLink(i, current_page).appendTo(container);
85
+ }
86
+ },
87
+ getLinks:function(current_page, eventHandler) {
88
+ var begin, end,
89
+ interval = this.pc.getInterval(current_page),
90
+ np = this.pc.numPages(),
91
+ fragment = $("<div class='pagination'></div>");
92
+
93
+ // Generate "Previous"-Link
94
+ if(this.opts.prev_text && (current_page > 0 || this.opts.prev_show_always)){
95
+ fragment.append(this.createLink(current_page-1, current_page, {text:this.opts.prev_text, classes:"prev"}));
96
+ }
97
+ // Generate starting points
98
+ if (interval.start > 0 && this.opts.num_edge_entries > 0)
99
+ {
100
+ end = Math.min(this.opts.num_edge_entries, interval.start);
101
+ this.appendRange(fragment, current_page, 0, end);
102
+ if(this.opts.num_edge_entries < interval.start && this.opts.ellipse_text)
103
+ {
104
+ jQuery("<span>"+this.opts.ellipse_text+"</span>").appendTo(fragment);
105
+ }
106
+ }
107
+ // Generate interval links
108
+ this.appendRange(fragment, current_page, interval.start, interval.end);
109
+ // Generate ending points
110
+ if (interval.end < np && this.opts.num_edge_entries > 0)
111
+ {
112
+ if(np-this.opts.num_edge_entries > interval.end && this.opts.ellipse_text)
113
+ {
114
+ jQuery("<span>"+this.opts.ellipse_text+"</span>").appendTo(fragment);
115
+ }
116
+ begin = Math.max(np-this.opts.num_edge_entries, interval.end);
117
+ this.appendRange(fragment, current_page, begin, np);
118
+
119
+ }
120
+ // Generate "Next"-Link
121
+ if(this.opts.next_text && (current_page < np-1 || this.opts.next_show_always)){
122
+ fragment.append(this.createLink(current_page+1, current_page, {text:this.opts.next_text, classes:"next"}));
123
+ }
124
+ $('a', fragment).click(eventHandler);
125
+ return fragment;
126
+ }
127
+ });
128
+
129
+ // Extend jQuery
130
+ $.fn.pagination = function(maxentries, opts){
131
+
132
+ // Initialize options with default values
133
+ opts = jQuery.extend({
134
+ items_per_page:10,
135
+ num_display_entries:10,
136
+ current_page:0,
137
+ num_edge_entries:0,
138
+ link_to:"#",
139
+ prev_text:"Prev",
140
+ next_text:"Next",
141
+ ellipse_text:"...",
142
+ prev_show_always:true,
143
+ next_show_always:true,
144
+ renderer:"defaultRenderer",
145
+ callback:function(){return false;}
146
+ },opts||{});
147
+
148
+ var containers = this,
149
+ renderer, links, current_page;
150
+
151
+
152
+ /**
153
+ * This is the event handling function for the pagination links.
154
+ * @param {int} page_id The new page number
155
+ */
156
+ function pageSelected(evt){
157
+ var links, current_page = $(evt.target).data('page_id');
158
+ containers.data('current_page', current_page);
159
+ links = renderer.getLinks(current_page, pageSelected);
160
+ containers.empty();
161
+ links.appendTo(containers);
162
+ var continuePropagation = opts.callback(current_page, containers);
163
+ if (!continuePropagation) {
164
+ if (evt.stopPropagation) {
165
+ evt.stopPropagation();
166
+ }
167
+ else {
168
+ evt.cancelBubble = true;
169
+ }
170
+ }
171
+ return continuePropagation;
172
+ }
173
+
174
+ current_page = opts.current_page;
175
+ containers.data('current_page', current_page);
176
+ // Create a sane value for maxentries and items_per_page
177
+ maxentries = (!maxentries || maxentries < 0)?1:maxentries;
178
+ opts.items_per_page = (!opts.items_per_page || opts.items_per_page < 0)?1:opts.items_per_page;
179
+
180
+ if(!$.PaginationRenderers[opts.renderer])
181
+ {
182
+ throw new ReferenceError("Pagination renderer '" + opts.renderer + "' was not found in jQuery.PaginationRenderers object.");
183
+ }
184
+ renderer = new $.PaginationRenderers[opts.renderer](maxentries, opts);
185
+
186
+ containers.each(function() {
187
+ // Attach control functions to the DOM element
188
+ this.selectPage = function(page_id){ pageSelected(page_id);}
189
+ this.prevPage = function(){
190
+ var current_page = containers.data('current_page');
191
+ if (current_page > 0) {
192
+ pageSelected(current_page - 1);
193
+ return true;
194
+ }
195
+ else {
196
+ return false;
197
+ }
198
+ }
199
+ this.nextPage = function(){
200
+ var current_page = containers.data('current_page');
201
+ if(current_page < numPages()-1) {
202
+ pageSelected(current_page+1);
203
+ return true;
204
+ }
205
+ else {
206
+ return false;
207
+ }
208
+ }
209
+ });
210
+ // When all initialisation is done, draw the links
211
+ links = renderer.getLinks(current_page, pageSelected);
212
+ containers.empty();
213
+ links.appendTo(containers);
214
+ // call callback function
215
+ opts.callback(current_page, containers);
216
+
217
+ }
218
+
219
+ })(jQuery);
lang/custom-contact-forms.mo ADDED
Binary file
lang/custom-contact-forms.po ADDED
@@ -0,0 +1,1600 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: custom-contact-forms\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-10-19 11:30-0500\n"
6
+ "PO-Revision-Date: 2010-10-19 11:39-0500\n"
7
+ "Last-Translator: Taylor Lovett <sdfds@sfs.com>\n"
8
+ "Language-Team: TaylorLovett.com <admin@taylorlovett.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;_e\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-Language: English\n"
15
+ "X-Poedit-Country: UNITED STATES\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../custom-contact-forms-admin.php:3
19
+ msgid "Custom Contact Forms"
20
+ msgstr ""
21
+
22
+ #: ../custom-contact-forms-admin.php:5
23
+ msgid "Plugin Instructions"
24
+ msgstr ""
25
+
26
+ #: ../custom-contact-forms-admin.php:6
27
+ #: ../custom-contact-forms-admin.php:610
28
+ msgid "General Settings"
29
+ msgstr ""
30
+
31
+ #: ../custom-contact-forms-admin.php:7
32
+ msgid "Create Fields"
33
+ msgstr ""
34
+
35
+ #: ../custom-contact-forms-admin.php:8
36
+ msgid "Create Forms"
37
+ msgstr ""
38
+
39
+ #: ../custom-contact-forms-admin.php:9
40
+ msgid "Manage Fields"
41
+ msgstr ""
42
+
43
+ #: ../custom-contact-forms-admin.php:10
44
+ #: ../custom-contact-forms-admin.php:259
45
+ msgid "Manage Fixed Fields"
46
+ msgstr ""
47
+
48
+ #: ../custom-contact-forms-admin.php:11
49
+ #: ../custom-contact-forms-admin.php:416
50
+ msgid "Manage Forms"
51
+ msgstr ""
52
+
53
+ #: ../custom-contact-forms-admin.php:12
54
+ msgid "Saved Form Submissions (New!)"
55
+ msgstr ""
56
+
57
+ #: ../custom-contact-forms-admin.php:13
58
+ msgid "Create Styles"
59
+ msgstr ""
60
+
61
+ #: ../custom-contact-forms-admin.php:14
62
+ msgid "Manage Styles"
63
+ msgstr ""
64
+
65
+ #: ../custom-contact-forms-admin.php:15
66
+ msgid "Manage Field Options"
67
+ msgstr ""
68
+
69
+ #: ../custom-contact-forms-admin.php:16
70
+ #: ../custom-contact-forms-admin.php:1129
71
+ msgid "Suggest a Feature"
72
+ msgstr ""
73
+
74
+ #: ../custom-contact-forms-admin.php:17
75
+ #: ../custom-contact-forms-admin.php:1128
76
+ msgid "Bug Report"
77
+ msgstr ""
78
+
79
+ #: ../custom-contact-forms-admin.php:18
80
+ #: ../custom-contact-forms-usage-popover.php:20
81
+ msgid "Custom HTML Forms"
82
+ msgstr ""
83
+
84
+ #: ../custom-contact-forms-admin.php:19
85
+ msgid "Import / Export (New!)"
86
+ msgstr ""
87
+
88
+ #: ../custom-contact-forms-admin.php:20
89
+ msgid "Plugin News"
90
+ msgstr ""
91
+
92
+ #: ../custom-contact-forms-admin.php:22
93
+ msgid "Rate This Plugin"
94
+ msgstr ""
95
+
96
+ #: ../custom-contact-forms-admin.php:22
97
+ msgid "We need your help to continue development! Please <span>rate this plugin</span> to show your support."
98
+ msgstr ""
99
+
100
+ #: ../custom-contact-forms-admin.php:24
101
+ msgid "Create A Form Field"
102
+ msgstr ""
103
+
104
+ #: ../custom-contact-forms-admin.php:29
105
+ msgid "Slug (Name):"
106
+ msgstr ""
107
+
108
+ #: ../custom-contact-forms-admin.php:32
109
+ msgid "(A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique.)"
110
+ msgstr ""
111
+
112
+ #: ../custom-contact-forms-admin.php:34
113
+ #: ../custom-contact-forms-usage-popover.php:130
114
+ msgid "Field Label:"
115
+ msgstr ""
116
+
117
+ #: ../custom-contact-forms-admin.php:37
118
+ msgid "(The field label is displayed next to the field and is visible to the user.)"
119
+ msgstr ""
120
+
121
+ #: ../custom-contact-forms-admin.php:39
122
+ #: ../custom-contact-forms-usage-popover.php:135
123
+ msgid "Field Type:"
124
+ msgstr ""
125
+
126
+ #: ../custom-contact-forms-admin.php:50
127
+ #: ../custom-contact-forms-usage-popover.php:140
128
+ msgid "Initial Value:"
129
+ msgstr ""
130
+
131
+ #: ../custom-contact-forms-admin.php:53
132
+ msgid ""
133
+ "This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox \n"
134
+ " 'Are you human?', I would set the initial value to 'Yes'."
135
+ msgstr ""
136
+
137
+ #: ../custom-contact-forms-admin.php:54
138
+ msgid "If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the"
139
+ msgstr ""
140
+
141
+ #: ../custom-contact-forms-admin.php:54
142
+ #: ../custom-contact-forms-admin.php:390
143
+ msgid "Create a Field Option"
144
+ msgstr ""
145
+
146
+ #: ../custom-contact-forms-admin.php:54
147
+ msgid "field option"
148
+ msgstr ""
149
+
150
+ #: ../custom-contact-forms-admin.php:54
151
+ msgid "you would like initially selected."
152
+ msgstr ""
153
+
154
+ #: ../custom-contact-forms-admin.php:56
155
+ #: ../custom-contact-forms-usage-popover.php:145
156
+ msgid "Max Length:"
157
+ msgstr ""
158
+
159
+ #: ../custom-contact-forms-admin.php:59
160
+ msgid "(0 for no limit; only applies to Text fields)"
161
+ msgstr ""
162
+
163
+ #: ../custom-contact-forms-admin.php:61
164
+ #: ../custom-contact-forms-usage-popover.php:150
165
+ msgid "Required Field:"
166
+ msgstr ""
167
+
168
+ #: ../custom-contact-forms-admin.php:63
169
+ #: ../custom-contact-forms-admin.php:184
170
+ #: ../custom-contact-forms-admin.php:298
171
+ #: ../custom-contact-forms-admin.php:618
172
+ #: ../custom-contact-forms-admin.php:659
173
+ #: ../custom-contact-forms-admin.php:675
174
+ #: ../custom-contact-forms-admin.php:698
175
+ msgid "No"
176
+ msgstr ""
177
+
178
+ #: ../custom-contact-forms-admin.php:64
179
+ #: ../custom-contact-forms-admin.php:183
180
+ #: ../custom-contact-forms-admin.php:297
181
+ #: ../custom-contact-forms-admin.php:304
182
+ #: ../custom-contact-forms-admin.php:617
183
+ #: ../custom-contact-forms-admin.php:658
184
+ #: ../custom-contact-forms-admin.php:674
185
+ #: ../custom-contact-forms-admin.php:697
186
+ msgid "Yes"
187
+ msgstr ""
188
+
189
+ #: ../custom-contact-forms-admin.php:67
190
+ msgid "(If a field is required and a user leaves it blank, the plugin will display an error message explainging the problem.)"
191
+ msgstr ""
192
+
193
+ #: ../custom-contact-forms-admin.php:69
194
+ #: ../custom-contact-forms-admin.php:200
195
+ #: ../custom-contact-forms-admin.php:321
196
+ #: ../custom-contact-forms-usage-popover.php:155
197
+ msgid "Field Instructions:"
198
+ msgstr ""
199
+
200
+ #: ../custom-contact-forms-admin.php:72
201
+ msgid "(If this is filled out, a tooltip popover displaying this text will show when the field is selected.)"
202
+ msgstr ""
203
+
204
+ #: ../custom-contact-forms-admin.php:75
205
+ msgid "Create Field"
206
+ msgstr ""
207
+
208
+ #: ../custom-contact-forms-admin.php:83
209
+ msgid "Create A Form"
210
+ msgstr ""
211
+
212
+ #: ../custom-contact-forms-admin.php:88
213
+ msgid "Form Slug:"
214
+ msgstr ""
215
+
216
+ #: ../custom-contact-forms-admin.php:91
217
+ msgid "(Must be unique and contain only underscores and alphanumeric characters.)"
218
+ msgstr ""
219
+
220
+ #: ../custom-contact-forms-admin.php:93
221
+ #: ../custom-contact-forms-usage-popover.php:211
222
+ msgid "Form Title:"
223
+ msgstr ""
224
+
225
+ #: ../custom-contact-forms-admin.php:95
226
+ msgid "(The form header text)"
227
+ msgstr ""
228
+
229
+ #: ../custom-contact-forms-admin.php:97
230
+ #: ../custom-contact-forms-usage-popover.php:216
231
+ msgid "Form Method:"
232
+ msgstr ""
233
+
234
+ #: ../custom-contact-forms-admin.php:102
235
+ msgid "(If unsure, leave as is.)"
236
+ msgstr ""
237
+
238
+ #: ../custom-contact-forms-admin.php:104
239
+ #: ../custom-contact-forms-usage-popover.php:221
240
+ msgid "Form Action:"
241
+ msgstr ""
242
+
243
+ #: ../custom-contact-forms-admin.php:107
244
+ msgid "(If unsure, leave blank. Enter a URL here, if and only if you want to process your forms somewhere else, for example with a service like Aweber or InfusionSoft.)"
245
+ msgstr ""
246
+
247
+ #: ../custom-contact-forms-admin.php:109
248
+ #: ../custom-contact-forms-usage-popover.php:226
249
+ msgid "Form Style:"
250
+ msgstr ""
251
+
252
+ #: ../custom-contact-forms-admin.php:113
253
+ msgid "Click to create a style"
254
+ msgstr ""
255
+
256
+ #: ../custom-contact-forms-admin.php:115
257
+ #: ../custom-contact-forms-usage-popover.php:231
258
+ msgid "Submit Button Text:"
259
+ msgstr ""
260
+
261
+ #: ../custom-contact-forms-admin.php:119
262
+ #: ../custom-contact-forms-admin.php:509
263
+ #: ../custom-contact-forms-usage-popover.php:236
264
+ msgid "Custom Code:"
265
+ msgstr ""
266
+
267
+ #: ../custom-contact-forms-admin.php:122
268
+ msgid "(If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag.)"
269
+ msgstr ""
270
+
271
+ #: ../custom-contact-forms-admin.php:124
272
+ #: ../custom-contact-forms-usage-popover.php:241
273
+ msgid "Form Destination Email:"
274
+ msgstr ""
275
+
276
+ #: ../custom-contact-forms-admin.php:127
277
+ msgid "(Will receive all submissions from this form; if left blank it will use the default specified in general settings.)"
278
+ msgstr ""
279
+
280
+ #: ../custom-contact-forms-admin.php:129
281
+ #: ../custom-contact-forms-usage-popover.php:246
282
+ msgid "Form Success Message:"
283
+ msgstr ""
284
+
285
+ #: ../custom-contact-forms-admin.php:132
286
+ #: ../custom-contact-forms-admin.php:137
287
+ msgid "(Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings.)"
288
+ msgstr ""
289
+
290
+ #: ../custom-contact-forms-admin.php:134
291
+ #: ../custom-contact-forms-usage-popover.php:251
292
+ msgid "Form Success Message Title:"
293
+ msgstr ""
294
+
295
+ #: ../custom-contact-forms-admin.php:139
296
+ #: ../custom-contact-forms-usage-popover.php:256
297
+ msgid "Custom Success URL:"
298
+ msgstr ""
299
+
300
+ #: ../custom-contact-forms-admin.php:142
301
+ msgid "(If this is filled out, users will be sent to this page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success.)"
302
+ msgstr ""
303
+
304
+ #: ../custom-contact-forms-admin.php:144
305
+ msgid "Create Form"
306
+ msgstr ""
307
+
308
+ #: ../custom-contact-forms-admin.php:151
309
+ msgid "Manage User Fields"
310
+ msgstr ""
311
+
312
+ #: ../custom-contact-forms-admin.php:155
313
+ #: ../custom-contact-forms-admin.php:248
314
+ #: ../custom-contact-forms-admin.php:263
315
+ #: ../custom-contact-forms-admin.php:333
316
+ #: ../custom-contact-forms-admin.php:348
317
+ #: ../custom-contact-forms-admin.php:383
318
+ #: ../custom-contact-forms-admin.php:421
319
+ #: ../custom-contact-forms-admin.php:530
320
+ msgid "Slug"
321
+ msgstr ""
322
+
323
+ #: ../custom-contact-forms-admin.php:156
324
+ #: ../custom-contact-forms-admin.php:249
325
+ #: ../custom-contact-forms-admin.php:264
326
+ #: ../custom-contact-forms-admin.php:334
327
+ #: ../custom-contact-forms-admin.php:349
328
+ #: ../custom-contact-forms-admin.php:384
329
+ msgid "Label"
330
+ msgstr ""
331
+
332
+ #: ../custom-contact-forms-admin.php:157
333
+ #: ../custom-contact-forms-admin.php:250
334
+ #: ../custom-contact-forms-admin.php:265
335
+ #: ../custom-contact-forms-admin.php:335
336
+ msgid "Type"
337
+ msgstr ""
338
+
339
+ #: ../custom-contact-forms-admin.php:158
340
+ #: ../custom-contact-forms-admin.php:251
341
+ #: ../custom-contact-forms-admin.php:266
342
+ #: ../custom-contact-forms-admin.php:336
343
+ msgid "Initial Value"
344
+ msgstr ""
345
+
346
+ #: ../custom-contact-forms-admin.php:159
347
+ #: ../custom-contact-forms-admin.php:252
348
+ #: ../custom-contact-forms-admin.php:267
349
+ #: ../custom-contact-forms-admin.php:337
350
+ msgid "Required"
351
+ msgstr ""
352
+
353
+ #: ../custom-contact-forms-admin.php:160
354
+ #: ../custom-contact-forms-admin.php:253
355
+ #: ../custom-contact-forms-admin.php:268
356
+ #: ../custom-contact-forms-admin.php:338
357
+ msgid "Maxlength"
358
+ msgstr ""
359
+
360
+ #: ../custom-contact-forms-admin.php:161
361
+ #: ../custom-contact-forms-admin.php:254
362
+ #: ../custom-contact-forms-admin.php:269
363
+ #: ../custom-contact-forms-admin.php:339
364
+ #: ../custom-contact-forms-admin.php:351
365
+ #: ../custom-contact-forms-admin.php:386
366
+ #: ../custom-contact-forms-admin.php:425
367
+ #: ../custom-contact-forms-admin.php:534
368
+ #: ../custom-contact-forms-admin.php:552
369
+ #: ../custom-contact-forms-admin.php:604
370
+ msgid "Action"
371
+ msgstr ""
372
+
373
+ #: ../custom-contact-forms-admin.php:195
374
+ #: ../custom-contact-forms-admin.php:316
375
+ #: ../custom-contact-forms-admin.php:364
376
+ #: ../custom-contact-forms-admin.php:450
377
+ #: ../custom-contact-forms-admin.php:968
378
+ msgid "Save"
379
+ msgstr ""
380
+
381
+ #: ../custom-contact-forms-admin.php:196
382
+ #: ../custom-contact-forms-admin.php:365
383
+ #: ../custom-contact-forms-admin.php:451
384
+ #: ../custom-contact-forms-admin.php:574
385
+ msgid "Delete"
386
+ msgstr ""
387
+
388
+ #: ../custom-contact-forms-admin.php:222
389
+ msgid "Dettach Field Option"
390
+ msgstr ""
391
+
392
+ #: ../custom-contact-forms-admin.php:224
393
+ msgid "Dettach field options you"
394
+ msgstr ""
395
+
396
+ #: ../custom-contact-forms-admin.php:224
397
+ #: ../custom-contact-forms-admin.php:504
398
+ msgid "create"
399
+ msgstr ""
400
+
401
+ #: ../custom-contact-forms-admin.php:233
402
+ msgid "Attach Field Option"
403
+ msgstr ""
404
+
405
+ #: ../custom-contact-forms-admin.php:236
406
+ msgid "Attach field options in the order you want them to display."
407
+ msgstr ""
408
+
409
+ #: ../custom-contact-forms-admin.php:284
410
+ #: ../custom-contact-forms-admin.php:311
411
+ msgid "None"
412
+ msgstr ""
413
+
414
+ #: ../custom-contact-forms-admin.php:345
415
+ msgid "Manage Field Options (for Dropdown and Radio Fields)"
416
+ msgstr ""
417
+
418
+ #: ../custom-contact-forms-admin.php:350
419
+ #: ../custom-contact-forms-admin.php:385
420
+ msgid "Value"
421
+ msgstr ""
422
+
423
+ #: ../custom-contact-forms-admin.php:376
424
+ msgid "No field options have been created."
425
+ msgstr ""
426
+
427
+ #: ../custom-contact-forms-admin.php:393
428
+ msgid "Option Slug:"
429
+ msgstr ""
430
+
431
+ #: ../custom-contact-forms-admin.php:396
432
+ msgid "(Used to identify this option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one')"
433
+ msgstr ""
434
+
435
+ #: ../custom-contact-forms-admin.php:398
436
+ #: ../custom-contact-forms-usage-popover.php:183
437
+ msgid "Option Label:"
438
+ msgstr ""
439
+
440
+ #: ../custom-contact-forms-admin.php:401
441
+ msgid "(This is what is shown to the user in the dropdown or radio field. Example:)"
442
+ msgstr ""
443
+
444
+ #: ../custom-contact-forms-admin.php:403
445
+ #: ../custom-contact-forms-usage-popover.php:188
446
+ msgid "Option Value:"
447
+ msgstr ""
448
+
449
+ #: ../custom-contact-forms-admin.php:406
450
+ msgid "(This is the actual value of the option which is not shown to the user. This can be the same thing as the label. An example pairing of label => value is: \"The color green\" => \"green\" or \"Yes\" => \"1\".)"
451
+ msgstr ""
452
+
453
+ #: ../custom-contact-forms-admin.php:408
454
+ msgid "Create Field Option"
455
+ msgstr ""
456
+
457
+ #: ../custom-contact-forms-admin.php:411
458
+ msgid "The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually sent in the email to you. For dropdown fields the option value is optional, for radio fields it is required."
459
+ msgstr ""
460
+
461
+ #: ../custom-contact-forms-admin.php:420
462
+ msgid "Form Display Code"
463
+ msgstr ""
464
+
465
+ #: ../custom-contact-forms-admin.php:422
466
+ #: ../custom-contact-forms-admin.php:531
467
+ msgid "Title"
468
+ msgstr ""
469
+
470
+ #: ../custom-contact-forms-admin.php:423
471
+ #: ../custom-contact-forms-admin.php:532
472
+ msgid "Button Text"
473
+ msgstr ""
474
+
475
+ #: ../custom-contact-forms-admin.php:424
476
+ #: ../custom-contact-forms-admin.php:533
477
+ msgid "Style"
478
+ msgstr ""
479
+
480
+ #: ../custom-contact-forms-admin.php:458
481
+ msgid "Method"
482
+ msgstr ""
483
+
484
+ #: ../custom-contact-forms-admin.php:459
485
+ msgid "Form Action"
486
+ msgstr ""
487
+
488
+ #: ../custom-contact-forms-admin.php:460
489
+ msgid "Destination Email"
490
+ msgstr ""
491
+
492
+ #: ../custom-contact-forms-admin.php:461
493
+ msgid "Success Message Title"
494
+ msgstr ""
495
+
496
+ #: ../custom-contact-forms-admin.php:462
497
+ msgid "Success Message"
498
+ msgstr ""
499
+
500
+ #: ../custom-contact-forms-admin.php:463
501
+ msgid "Custom Success URL"
502
+ msgstr ""
503
+
504
+ #: ../custom-contact-forms-admin.php:466
505
+ msgid "The Form Method is the method by which information is transfer through your form. If you aren't an expert with HTML and PHP, leave this as Post."
506
+ msgstr ""
507
+
508
+ #: ../custom-contact-forms-admin.php:470
509
+ msgid "This lets you process your forms through alternate scripts. If you use a service like InfusionSoft or Aweber, set this to be the same form action as the code provided to you by that service, otherwise leave this blank."
510
+ msgstr ""
511
+
512
+ #: ../custom-contact-forms-admin.php:472
513
+ msgid "This email address will recieve form emails (provided that Email Form Submissions is set to Yes in general settings)."
514
+ msgstr ""
515
+
516
+ #: ../custom-contact-forms-admin.php:474
517
+ msgid "This will be displayed as the header in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
518
+ msgstr ""
519
+
520
+ #: ../custom-contact-forms-admin.php:476
521
+ msgid "This will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
522
+ msgstr ""
523
+
524
+ #: ../custom-contact-forms-admin.php:478
525
+ msgid "If this is filled out, users will be sent to this thank you page when they successfully fill out this form. If it is left blank, a popover showing the form's 'success message' will be displayed on form success."
526
+ msgstr ""
527
+
528
+ #: ../custom-contact-forms-admin.php:482
529
+ msgid "Attached Fields:"
530
+ msgstr ""
531
+
532
+ #: ../custom-contact-forms-admin.php:495
533
+ msgid "Dettach Field"
534
+ msgstr ""
535
+
536
+ #: ../custom-contact-forms-admin.php:497
537
+ msgid "Attach fields in the order you want them displayed."
538
+ msgstr ""
539
+
540
+ #: ../custom-contact-forms-admin.php:498
541
+ msgid "Attach Field:"
542
+ msgstr ""
543
+
544
+ #: ../custom-contact-forms-admin.php:502
545
+ msgid "Attach Field"
546
+ msgstr ""
547
+
548
+ #: ../custom-contact-forms-admin.php:504
549
+ msgid "Attach fixed fields or ones you"
550
+ msgstr ""
551
+
552
+ #: ../custom-contact-forms-admin.php:507
553
+ msgid "The form display code above ([customcontact form=x]) will only work in Wordpress pages and posts. If you want to display this form in a theme file such as page.php, header.php, index.php, category.php, etc, then insert this PHP snippet."
554
+ msgstr ""
555
+
556
+ #: ../custom-contact-forms-admin.php:507
557
+ msgid "Code to Display Form in Theme Files:"
558
+ msgstr ""
559
+
560
+ #: ../custom-contact-forms-admin.php:509
561
+ msgid "This field allows you to insert HTML directly after the starting <form> tag."
562
+ msgstr ""
563
+
564
+ #: ../custom-contact-forms-admin.php:529
565
+ msgid "Form Code"
566
+ msgstr ""
567
+
568
+ #: ../custom-contact-forms-admin.php:545
569
+ #: ../custom-contact-forms-usage-popover.php:307
570
+ msgid "Saved Form Submissions"
571
+ msgstr ""
572
+
573
+ #: ../custom-contact-forms-admin.php:549
574
+ #: ../custom-contact-forms-admin.php:601
575
+ msgid "Date Submitted"
576
+ msgstr ""
577
+
578
+ #: ../custom-contact-forms-admin.php:550
579
+ #: ../custom-contact-forms-admin.php:602
580
+ msgid "Form Submitted"
581
+ msgstr ""
582
+
583
+ #: ../custom-contact-forms-admin.php:551
584
+ #: ../custom-contact-forms-admin.php:603
585
+ msgid "Form Page"
586
+ msgstr ""
587
+
588
+ #: ../custom-contact-forms-admin.php:568
589
+ msgid "Custom HTML Form"
590
+ msgstr ""
591
+
592
+ #: ../custom-contact-forms-admin.php:615
593
+ msgid "Email Form Submissions:"
594
+ msgstr ""
595
+
596
+ #: ../custom-contact-forms-admin.php:621
597
+ msgid "When a user fills out one of your forms, the info he submitted is saved in the Saved Form Submission section of the admin panel for you to view. If this is enabled, you will also be sent an email containing the submission info."
598
+ msgstr ""
599
+
600
+ #: ../custom-contact-forms-admin.php:623
601
+ msgid "Default Email:"
602
+ msgstr ""
603
+
604
+ #: ../custom-contact-forms-admin.php:626
605
+ msgid "Form emails will be sent <span>to</span> this address, if no destination email is specified by the form."
606
+ msgstr ""
607
+
608
+ #: ../custom-contact-forms-admin.php:628
609
+ msgid "Front End JQuery:"
610
+ msgstr ""
611
+
612
+ #: ../custom-contact-forms-admin.php:630
613
+ #: ../custom-contact-forms-admin.php:666
614
+ #: ../custom-contact-forms-admin.php:689
615
+ msgid "Enabled"
616
+ msgstr ""
617
+
618
+ #: ../custom-contact-forms-admin.php:631
619
+ #: ../custom-contact-forms-admin.php:667
620
+ #: ../custom-contact-forms-admin.php:690
621
+ msgid "Disabled"
622
+ msgstr ""
623
+
624
+ #: ../custom-contact-forms-admin.php:634
625
+ #, php-format
626
+ msgid "Some plugins don't setup JQuery correctly, so when any other plugin uses JQuery (whether correctly or not), JQuery works for neither plugin. This plugin uses JQuery correctly. If another plugin isn't using JQuery correctly but is more important to you than this one: disable this option. 99% of this plugin's functionality will work without JQuery, just no field instruction tooltips."
627
+ msgstr ""
628
+
629
+ #: ../custom-contact-forms-admin.php:636
630
+ msgid "Default From Email:"
631
+ msgstr ""
632
+
633
+ #: ../custom-contact-forms-admin.php:639
634
+ msgid "Form emails will be sent <span>from</span> this address. It is recommended you provide a real email address that has been created through your host."
635
+ msgstr ""
636
+
637
+ #: ../custom-contact-forms-admin.php:641
638
+ msgid "Default Email Subject:"
639
+ msgstr ""
640
+
641
+ #: ../custom-contact-forms-admin.php:644
642
+ msgid "Default subject to be included in all form emails."
643
+ msgstr ""
644
+
645
+ #: ../custom-contact-forms-admin.php:646
646
+ msgid "Default Form Success Message Title:"
647
+ msgstr ""
648
+
649
+ #: ../custom-contact-forms-admin.php:649
650
+ msgid "If someone fills out a form for which a success message title is not provided and a custom success page is not provided, the plugin will show a popover using this field as the window title."
651
+ msgstr ""
652
+
653
+ #: ../custom-contact-forms-admin.php:651
654
+ msgid "Default Form Success Message:"
655
+ msgstr ""
656
+
657
+ #: ../custom-contact-forms-admin.php:654
658
+ msgid "If someone fills out a form for which a success message is not provided and a custom success page is not provided, the plugin will show a popover containing this message."
659
+ msgstr ""
660
+
661
+ #: ../custom-contact-forms-admin.php:656
662
+ msgid "Remember Field Values:"
663
+ msgstr ""
664
+
665
+ #: ../custom-contact-forms-admin.php:662
666
+ msgid "Selecting yes will make form fields remember how they were last filled out."
667
+ msgstr ""
668
+
669
+ #: ../custom-contact-forms-admin.php:664
670
+ msgid "Tooltips in Widget:"
671
+ msgstr ""
672
+
673
+ #: ../custom-contact-forms-admin.php:670
674
+ msgid "Enabling this shows tooltips containing field instructions on forms in the widget."
675
+ msgstr ""
676
+
677
+ #: ../custom-contact-forms-admin.php:672
678
+ msgid "Hide Plugin Author Link in Code:"
679
+ msgstr ""
680
+
681
+ #: ../custom-contact-forms-admin.php:679
682
+ msgid "Use Code Type:"
683
+ msgstr ""
684
+
685
+ #: ../custom-contact-forms-admin.php:685
686
+ msgid "This lets you switch the form code between HTML and XHTML."
687
+ msgstr ""
688
+
689
+ #: ../custom-contact-forms-admin.php:687
690
+ msgid "Fancy Admin AJAX Abilities:"
691
+ msgstr ""
692
+
693
+ #: ../custom-contact-forms-admin.php:693
694
+ msgid "If you enable this, creating, editing and modifying forms, fields, styles, etc in the admin panel will be done using AJAX. This means that clicking things like 'Edit' or 'Delete' will not cause the page to reload thus managing your forms will be much smoother and quicker. If you are having problems with things not saving, deleting, or inserting correctly, then disable this and fill out a bug report below."
695
+ msgstr ""
696
+
697
+ #: ../custom-contact-forms-admin.php:695
698
+ msgid "Use Wordpress Mail Function:"
699
+ msgstr ""
700
+
701
+ #: ../custom-contact-forms-admin.php:701
702
+ msgid "Setting this to no will use the PHP mail function. If your forms aren't sending mail properly try setting this to no."
703
+ msgstr ""
704
+
705
+ #: ../custom-contact-forms-admin.php:702
706
+ msgid "Show Sidebar Widget:"
707
+ msgstr ""
708
+
709
+ #: ../custom-contact-forms-admin.php:706
710
+ msgid "On Homepage"
711
+ msgstr ""
712
+
713
+ #: ../custom-contact-forms-admin.php:709
714
+ msgid "On Pages"
715
+ msgstr ""
716
+
717
+ #: ../custom-contact-forms-admin.php:712
718
+ msgid "On Single Posts"
719
+ msgstr ""
720
+
721
+ #: ../custom-contact-forms-admin.php:716
722
+ msgid "On Categories"
723
+ msgstr ""
724
+
725
+ #: ../custom-contact-forms-admin.php:719
726
+ msgid "On Archives"
727
+ msgstr ""
728
+
729
+ #: ../custom-contact-forms-admin.php:722
730
+ msgid "Update"
731
+ msgstr ""
732
+
733
+ #: ../custom-contact-forms-admin.php:730
734
+ msgid "Instructions"
735
+ msgstr ""
736
+
737
+ #: ../custom-contact-forms-admin.php:732
738
+ msgid "The default content will help you get a better feel of ways this plugin can be used and is the best way to learn."
739
+ msgstr ""
740
+
741
+ #: ../custom-contact-forms-admin.php:735
742
+ #: ../custom-contact-forms-usage-popover.php:41
743
+ msgid "Insert Default Content"
744
+ msgstr ""
745
+
746
+ #: ../custom-contact-forms-admin.php:738
747
+ msgid "1. Create a form."
748
+ msgstr ""
749
+
750
+ #: ../custom-contact-forms-admin.php:739
751
+ msgid "2. Create fields and attach those fields to the forms of your choice."
752
+ msgstr ""
753
+
754
+ #: ../custom-contact-forms-admin.php:739
755
+ msgid "Attach the fields in the order that you want them to show up in the form. If you mess up you can detach and reattach them. Create field options in the field option manager; field options should be attached to radio and dropdown fields."
756
+ msgstr ""
757
+
758
+ #: ../custom-contact-forms-admin.php:740
759
+ msgid "3. Display those forms in posts and pages by inserting the code: [customcontact form=<b>FORMID</b>]. Replace <b>FORMID</b> with the id listed to the left of the form slug next to the form of your choice above. You can also display forms in theme files; the code for this is provided within each forms admin section."
760
+ msgstr ""
761
+
762
+ #: ../custom-contact-forms-admin.php:741
763
+ msgid "4. Prevent spam by attaching the fixed field, captcha or ishuman. Captcha requires users to type in a number shown on an image. Ishuman requires users to check a box to prove they aren't a spam bot."
764
+ msgstr ""
765
+
766
+ #: ../custom-contact-forms-admin.php:742
767
+ msgid "5. Add a form to your sidebar, by dragging the Custom Contact Form widget in to your sidebar."
768
+ msgstr ""
769
+
770
+ #: ../custom-contact-forms-admin.php:743
771
+ msgid "6. Configure the General Settings appropriately; this is important if you want to receive your web form messages!"
772
+ msgstr ""
773
+
774
+ #: ../custom-contact-forms-admin.php:744
775
+ msgid "7. Create form styles to change your forms appearances. The image below explains how each style field can change the look of your forms."
776
+ msgstr ""
777
+
778
+ #: ../custom-contact-forms-admin.php:745
779
+ msgid "8. (advanced) If you are confident in your HTML and CSS skills, you can use the"
780
+ msgstr ""
781
+
782
+ #: ../custom-contact-forms-admin.php:745
783
+ msgid "Custom HTML Forms feature"
784
+ msgstr ""
785
+
786
+ #: ../custom-contact-forms-admin.php:745
787
+ msgid "as a framework and write your forms from scratch. This allows you to use this plugin simply to process your form requests. The Custom HTML Forms feature will process and email any form variables sent to it regardless of whether they are created in the fields manager."
788
+ msgstr ""
789
+
790
+ #: ../custom-contact-forms-admin.php:746
791
+ msgid "These instructions briefly tell you in which order you should use forms, fields, field options, and styles."
792
+ msgstr ""
793
+
794
+ #: ../custom-contact-forms-admin.php:746
795
+ msgid "If you want to read in detail about using forms, fields, field options, styles and the rest of this plugin, click the button below."
796
+ msgstr ""
797
+
798
+ #: ../custom-contact-forms-admin.php:748
799
+ msgid "View Plugin Usage Popover"
800
+ msgstr ""
801
+
802
+ #: ../custom-contact-forms-admin.php:756
803
+ msgid "Create A Style for Your Forms"
804
+ msgstr ""
805
+
806
+ #: ../custom-contact-forms-admin.php:758
807
+ msgid "Use this manager to create styles for your forms. Each field is already filled out with nice look defaults. It is recommended you simply input a slug and click create to see the defaults before you start changing values."
808
+ msgstr ""
809
+
810
+ #: ../custom-contact-forms-admin.php:762
811
+ msgid "Style Slug:"
812
+ msgstr ""
813
+
814
+ #: ../custom-contact-forms-admin.php:764
815
+ msgid "(Must be unique)"
816
+ msgstr ""
817
+
818
+ #: ../custom-contact-forms-admin.php:766
819
+ #: ../custom-contact-forms-admin.php:1011
820
+ #: ../custom-contact-forms-admin.php:1016
821
+ msgid "Title Font Size:"
822
+ msgstr ""
823
+
824
+ #: ../custom-contact-forms-admin.php:768
825
+ msgid "(ex: 10pt, 10px, 1em)"
826
+ msgstr ""
827
+
828
+ #: ../custom-contact-forms-admin.php:770
829
+ #: ../custom-contact-forms-admin.php:1038
830
+ #: ../custom-contact-forms-admin.php:1080
831
+ msgid "Title Font Color:"
832
+ msgstr ""
833
+
834
+ #: ../custom-contact-forms-admin.php:772
835
+ #: ../custom-contact-forms-admin.php:784
836
+ #: ../custom-contact-forms-admin.php:822
837
+ #: ../custom-contact-forms-admin.php:882
838
+ #: ../custom-contact-forms-admin.php:886
839
+ #: ../custom-contact-forms-admin.php:902
840
+ msgid "(ex: FF0000)"
841
+ msgstr ""
842
+
843
+ #: ../custom-contact-forms-admin.php:774
844
+ #: ../custom-contact-forms-admin.php:995
845
+ msgid "Label Width:"
846
+ msgstr ""
847
+
848
+ #: ../custom-contact-forms-admin.php:776
849
+ msgid "(ex: 100px or 20%)"
850
+ msgstr ""
851
+
852
+ #: ../custom-contact-forms-admin.php:778
853
+ #: ../custom-contact-forms-admin.php:1019
854
+ msgid "Label Font Size:"
855
+ msgstr ""
856
+
857
+ #: ../custom-contact-forms-admin.php:780
858
+ #: ../custom-contact-forms-admin.php:878
859
+ msgid "(ex: 10px, 10pt, 1em)"
860
+ msgstr ""
861
+
862
+ #: ../custom-contact-forms-admin.php:782
863
+ #: ../custom-contact-forms-admin.php:1041
864
+ msgid "Label Font Color:"
865
+ msgstr ""
866
+
867
+ #: ../custom-contact-forms-admin.php:786
868
+ #: ../custom-contact-forms-admin.php:975
869
+ msgid "Text Field Width:"
870
+ msgstr ""
871
+
872
+ #: ../custom-contact-forms-admin.php:788
873
+ #: ../custom-contact-forms-admin.php:792
874
+ #: ../custom-contact-forms-admin.php:796
875
+ #: ../custom-contact-forms-admin.php:844
876
+ msgid "(ex: 100px or 100%)"
877
+ msgstr ""
878
+
879
+ #: ../custom-contact-forms-admin.php:790
880
+ msgid "Textarea Field Width:"
881
+ msgstr ""
882
+
883
+ #: ../custom-contact-forms-admin.php:794
884
+ msgid "Textarea Field Height:"
885
+ msgstr ""
886
+
887
+ #: ../custom-contact-forms-admin.php:798
888
+ #: ../custom-contact-forms-admin.php:1022
889
+ msgid "Field Font Size:"
890
+ msgstr ""
891
+
892
+ #: ../custom-contact-forms-admin.php:800
893
+ msgid "(ex: 10px, 10pt, 1em"
894
+ msgstr ""
895
+
896
+ #: ../custom-contact-forms-admin.php:802
897
+ #: ../custom-contact-forms-admin.php:1044
898
+ msgid "Field Font Color:"
899
+ msgstr ""
900
+
901
+ #: ../custom-contact-forms-admin.php:804
902
+ #: ../custom-contact-forms-admin.php:826
903
+ msgid "(ex: 333333)"
904
+ msgstr ""
905
+
906
+ #: ../custom-contact-forms-admin.php:806
907
+ #: ../custom-contact-forms-admin.php:1074
908
+ msgid "Field Border Style:"
909
+ msgstr ""
910
+
911
+ #: ../custom-contact-forms-admin.php:812
912
+ #: ../custom-contact-forms-admin.php:1050
913
+ msgid "Form Margin:"
914
+ msgstr ""
915
+
916
+ #: ../custom-contact-forms-admin.php:814
917
+ #: ../custom-contact-forms-admin.php:818
918
+ #: ../custom-contact-forms-admin.php:890
919
+ #: ../custom-contact-forms-admin.php:894
920
+ msgid "(ex: 5px or 1em)"
921
+ msgstr ""
922
+
923
+ #: ../custom-contact-forms-admin.php:816
924
+ #: ../custom-contact-forms-admin.php:987
925
+ msgid "Label Margin:"
926
+ msgstr ""
927
+
928
+ #: ../custom-contact-forms-admin.php:820
929
+ msgid "Textarea Background Color:"
930
+ msgstr ""
931
+
932
+ #: ../custom-contact-forms-admin.php:824
933
+ msgid "Success Popover Font Color:"
934
+ msgstr ""
935
+
936
+ #: ../custom-contact-forms-admin.php:828
937
+ msgid "Success Popover Title Font Size:"
938
+ msgstr ""
939
+
940
+ #: ../custom-contact-forms-admin.php:830
941
+ #: ../custom-contact-forms-admin.php:834
942
+ #: ../custom-contact-forms-admin.php:906
943
+ #: ../custom-contact-forms-admin.php:918
944
+ msgid "(ex: 12px, 1em, 100%)"
945
+ msgstr ""
946
+
947
+ #: ../custom-contact-forms-admin.php:832
948
+ #: ../custom-contact-forms-admin.php:1013
949
+ msgid "Form Background Color:"
950
+ msgstr ""
951
+
952
+ #: ../custom-contact-forms-admin.php:836
953
+ msgid "Tooltip Background Color:"
954
+ msgstr ""
955
+
956
+ #: ../custom-contact-forms-admin.php:838
957
+ msgid "(ex: 000000 or black)"
958
+ msgstr ""
959
+
960
+ #: ../custom-contact-forms-admin.php:842
961
+ #: ../custom-contact-forms-admin.php:1071
962
+ msgid "Field Border Color:"
963
+ msgstr ""
964
+
965
+ #: ../custom-contact-forms-admin.php:846
966
+ #: ../custom-contact-forms-admin.php:1060
967
+ msgid "Form Border Style:"
968
+ msgstr ""
969
+
970
+ #: ../custom-contact-forms-admin.php:852
971
+ #: ../custom-contact-forms-admin.php:1068
972
+ msgid "Form Border Color:"
973
+ msgstr ""
974
+
975
+ #: ../custom-contact-forms-admin.php:854
976
+ msgid "(ex: 000000)"
977
+ msgstr ""
978
+
979
+ #: ../custom-contact-forms-admin.php:856
980
+ #: ../custom-contact-forms-admin.php:1065
981
+ msgid "Form Border Width:"
982
+ msgstr ""
983
+
984
+ #: ../custom-contact-forms-admin.php:858
985
+ msgid "(ex: 1px)"
986
+ msgstr ""
987
+
988
+ #: ../custom-contact-forms-admin.php:860
989
+ #: ../custom-contact-forms-admin.php:972
990
+ msgid "Form Width:"
991
+ msgstr ""
992
+
993
+ #: ../custom-contact-forms-admin.php:862
994
+ msgid "(ex: 100px or 50%)"
995
+ msgstr ""
996
+
997
+ #: ../custom-contact-forms-admin.php:864
998
+ msgid "Form Font Family:"
999
+ msgstr ""
1000
+
1001
+ #: ../custom-contact-forms-admin.php:866
1002
+ msgid "(ex: Verdana, Tahoma, Arial)"
1003
+ msgstr ""
1004
+
1005
+ #: ../custom-contact-forms-admin.php:868
1006
+ #: ../custom-contact-forms-admin.php:998
1007
+ msgid "Button Width:"
1008
+ msgstr ""
1009
+
1010
+ #: ../custom-contact-forms-admin.php:870
1011
+ msgid "(ex: 100px, 30%, auto)"
1012
+ msgstr ""
1013
+
1014
+ #: ../custom-contact-forms-admin.php:872
1015
+ #: ../custom-contact-forms-admin.php:1001
1016
+ msgid "Button Height:"
1017
+ msgstr ""
1018
+
1019
+ #: ../custom-contact-forms-admin.php:874
1020
+ msgid "(ex: 100px or 30%)"
1021
+ msgstr ""
1022
+
1023
+ #: ../custom-contact-forms-admin.php:876
1024
+ #: ../custom-contact-forms-admin.php:1025
1025
+ msgid "Button Font Size:"
1026
+ msgstr ""
1027
+
1028
+ #: ../custom-contact-forms-admin.php:880
1029
+ #: ../custom-contact-forms-admin.php:1047
1030
+ msgid "Button Font Color:"
1031
+ msgstr ""
1032
+
1033
+ #: ../custom-contact-forms-admin.php:884
1034
+ #: ../custom-contact-forms-admin.php:1004
1035
+ msgid "Field Background Color:"
1036
+ msgstr ""
1037
+
1038
+ #: ../custom-contact-forms-admin.php:888
1039
+ #: ../custom-contact-forms-admin.php:1028
1040
+ msgid "Form Padding:"
1041
+ msgstr ""
1042
+
1043
+ #: ../custom-contact-forms-admin.php:892
1044
+ #: ../custom-contact-forms-admin.php:1007
1045
+ msgid "Title Margin:"
1046
+ msgstr ""
1047
+
1048
+ #: ../custom-contact-forms-admin.php:896
1049
+ #: ../custom-contact-forms-admin.php:984
1050
+ msgid "Dropdown Width:"
1051
+ msgstr ""
1052
+
1053
+ #: ../custom-contact-forms-admin.php:898
1054
+ msgid "(ex: 30px, 20%, or auto)"
1055
+ msgstr ""
1056
+
1057
+ #: ../custom-contact-forms-admin.php:900
1058
+ msgid "Success Popover Border Color:"
1059
+ msgstr ""
1060
+
1061
+ #: ../custom-contact-forms-admin.php:904
1062
+ msgid "Success Popover Font Size:"
1063
+ msgstr ""
1064
+
1065
+ #: ../custom-contact-forms-admin.php:908
1066
+ msgid "Success Popover Height:"
1067
+ msgstr ""
1068
+
1069
+ #: ../custom-contact-forms-admin.php:910
1070
+ msgid "(ex: 200px, 6em, 50%)"
1071
+ msgstr ""
1072
+
1073
+ #: ../custom-contact-forms-admin.php:912
1074
+ #: ../custom-contact-forms-admin.php:1083
1075
+ msgid "Field Border Roundness:"
1076
+ msgstr ""
1077
+
1078
+ #: ../custom-contact-forms-admin.php:914
1079
+ msgid "(ex: 6px, or 0px)"
1080
+ msgstr ""
1081
+
1082
+ #: ../custom-contact-forms-admin.php:916
1083
+ #: ../custom-contact-forms-admin.php:965
1084
+ #: ../custom-contact-forms-admin.php:1035
1085
+ msgid "Tooltip"
1086
+ msgstr ""
1087
+
1088
+ #: ../custom-contact-forms-admin.php:916
1089
+ #: ../custom-contact-forms-admin.php:965
1090
+ #: ../custom-contact-forms-admin.php:1035
1091
+ msgid "A tooltip is the little box that fades in displaying 'Field Instructions' when a user selects a particular field."
1092
+ msgstr ""
1093
+
1094
+ #: ../custom-contact-forms-admin.php:916
1095
+ #: ../custom-contact-forms-admin.php:1032
1096
+ msgid "Font Size:"
1097
+ msgstr ""
1098
+
1099
+ #: ../custom-contact-forms-admin.php:920
1100
+ msgid "Tooltip Font Color:"
1101
+ msgstr ""
1102
+
1103
+ #: ../custom-contact-forms-admin.php:922
1104
+ msgid "(ex: ffffff or white)"
1105
+ msgstr ""
1106
+
1107
+ #: ../custom-contact-forms-admin.php:924
1108
+ msgid "Create Style"
1109
+ msgstr ""
1110
+
1111
+ #: ../custom-contact-forms-admin.php:931
1112
+ msgid "Manage Form Styles"
1113
+ msgstr ""
1114
+
1115
+ #: ../custom-contact-forms-admin.php:951
1116
+ #: ../custom-contact-forms-usage-popover.php:125
1117
+ #: ../custom-contact-forms-usage-popover.php:178
1118
+ #: ../custom-contact-forms-usage-popover.php:206
1119
+ msgid "Slug:"
1120
+ msgstr ""
1121
+
1122
+ #: ../custom-contact-forms-admin.php:954
1123
+ msgid "Font Family:"
1124
+ msgstr ""
1125
+
1126
+ #: ../custom-contact-forms-admin.php:957
1127
+ msgid "Textarea Background"
1128
+ msgstr ""
1129
+
1130
+ #: ../custom-contact-forms-admin.php:958
1131
+ msgid "Color:"
1132
+ msgstr ""
1133
+
1134
+ #: ../custom-contact-forms-admin.php:961
1135
+ #: ../custom-contact-forms-admin.php:990
1136
+ #: ../custom-contact-forms-admin.php:1010
1137
+ #: ../custom-contact-forms-admin.php:1031
1138
+ #: ../custom-contact-forms-admin.php:1053
1139
+ #: ../custom-contact-forms-admin.php:1079
1140
+ msgid "Success Popover"
1141
+ msgstr ""
1142
+
1143
+ #: ../custom-contact-forms-admin.php:962
1144
+ msgid "Border Color:"
1145
+ msgstr ""
1146
+
1147
+ #: ../custom-contact-forms-admin.php:965
1148
+ #: ../custom-contact-forms-admin.php:1054
1149
+ msgid "Font Color:"
1150
+ msgstr ""
1151
+
1152
+ #: ../custom-contact-forms-admin.php:970
1153
+ msgid "Delete Style"
1154
+ msgstr ""
1155
+
1156
+ #: ../custom-contact-forms-admin.php:978
1157
+ msgid "Textarea Width:"
1158
+ msgstr ""
1159
+
1160
+ #: ../custom-contact-forms-admin.php:981
1161
+ msgid "Textarea Height:"
1162
+ msgstr ""
1163
+
1164
+ #: ../custom-contact-forms-admin.php:991
1165
+ msgid "Height:"
1166
+ msgstr ""
1167
+
1168
+ #: ../custom-contact-forms-admin.php:1035
1169
+ msgid "Background Color:"
1170
+ msgstr ""
1171
+
1172
+ #: ../custom-contact-forms-admin.php:1057
1173
+ msgid "Tooltip Font Size:"
1174
+ msgstr ""
1175
+
1176
+ #: ../custom-contact-forms-admin.php:1109
1177
+ msgid "Report a Bug/Suggest a Feature"
1178
+ msgstr ""
1179
+
1180
+ #: ../custom-contact-forms-admin.php:1114
1181
+ msgid "Your Name:"
1182
+ msgstr ""
1183
+
1184
+ #: ../custom-contact-forms-admin.php:1118
1185
+ msgid "Your Email:"
1186
+ msgstr ""
1187
+
1188
+ #: ../custom-contact-forms-admin.php:1122
1189
+ msgid "Your Message:"
1190
+ msgstr ""
1191
+
1192
+ #: ../custom-contact-forms-admin.php:1126
1193
+ msgid "Purpose of this message:"
1194
+ msgstr ""
1195
+
1196
+ #: ../custom-contact-forms-admin.php:1130
1197
+ msgid "Plugin Question"
1198
+ msgstr ""
1199
+
1200
+ #: ../custom-contact-forms-admin.php:1135
1201
+ msgid "Send Message"
1202
+ msgstr ""
1203
+
1204
+ #: ../custom-contact-forms-admin.php:1142
1205
+ msgid "Custom HTML Forms (Advanced)"
1206
+ msgstr ""
1207
+
1208
+ #: ../custom-contact-forms-admin.php:1144
1209
+ msgid ""
1210
+ "If you know HTML and simply want to use this plugin to process form requests, this feature is for you. \n"
1211
+ " The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following: a) Keep the form action/method the same (yes the action is supposed to be empty), b) Include all the hidden fields shown below, c) provide a \n"
1212
+ " hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately."
1213
+ msgstr ""
1214
+
1215
+ #: ../custom-contact-forms-admin.php:1150
1216
+ msgid "Thank you for filling out our form!"
1217
+ msgstr ""
1218
+
1219
+ #: ../custom-contact-forms-admin.php:1155
1220
+ msgid ""
1221
+ "Build your form in here. It is recommended you only use this feature if you are experienced with HTML. \n"
1222
+ "The success_message field will add a popover containing the message when the form is completed successfully, the thank_you_page field will force \n"
1223
+ "the user to be redirected to that specific page on successful form completion. The required_fields hidden field is optional; to use it seperate \n"
1224
+ "the field names you want required by commas. Remember to use underscores instead of spaces in field names!"
1225
+ msgstr ""
1226
+
1227
+ #: ../custom-contact-forms-admin.php:1165
1228
+ #: ../custom-contact-forms-usage-popover.php:315
1229
+ msgid "Import / Export"
1230
+ msgstr ""
1231
+
1232
+ #: ../custom-contact-forms-admin.php:1170
1233
+ msgid "Browse to a CCF .sql export file to import Custom Contact Form data from another Wordpress installation to this one."
1234
+ msgstr ""
1235
+
1236
+ #: ../custom-contact-forms-admin.php:1173
1237
+ msgid "Use Import File General Settings"
1238
+ msgstr ""
1239
+
1240
+ #: ../custom-contact-forms-admin.php:1176
1241
+ msgid "Import"
1242
+ msgstr ""
1243
+
1244
+ #: ../custom-contact-forms-admin.php:1179
1245
+ msgid ""
1246
+ "Preforming a Custom Contact Forms export will create a file of the form \n"
1247
+ " ccf-export-xxxx.sql on your web server. The file created contains SQL that \n"
1248
+ " will recreate all the plugin data on any Wordpress installation."
1249
+ msgstr ""
1250
+
1251
+ #: ../custom-contact-forms-admin.php:1182
1252
+ msgid "Export All CCF Plugin Content"
1253
+ msgstr ""
1254
+
1255
+ #: ../custom-contact-forms-admin.php:1189
1256
+ msgid "Custom Contact Forms Plugin News"
1257
+ msgstr ""
1258
+
1259
+ #: ../custom-contact-forms-usage-popover.php:3
1260
+ msgid "How To Use Custom Contact Forms"
1261
+ msgstr ""
1262
+
1263
+ #: ../custom-contact-forms-usage-popover.php:8
1264
+ #: ../custom-contact-forms-usage-popover.php:199
1265
+ msgid "Forms"
1266
+ msgstr ""
1267
+
1268
+ #: ../custom-contact-forms-usage-popover.php:11
1269
+ #: ../custom-contact-forms-usage-popover.php:49
1270
+ msgid "Fields"
1271
+ msgstr ""
1272
+
1273
+ #: ../custom-contact-forms-usage-popover.php:14
1274
+ #: ../custom-contact-forms-usage-popover.php:171
1275
+ msgid "Field Options"
1276
+ msgstr ""
1277
+
1278
+ #: ../custom-contact-forms-usage-popover.php:17
1279
+ msgid "Styles"
1280
+ msgstr ""
1281
+
1282
+ #: ../custom-contact-forms-usage-popover.php:23
1283
+ msgid "Import/Export"
1284
+ msgstr ""
1285
+
1286
+ #: ../custom-contact-forms-usage-popover.php:26
1287
+ msgid "Form Submissions"
1288
+ msgstr ""
1289
+
1290
+ #: ../custom-contact-forms-usage-popover.php:30
1291
+ msgid "Introduction"
1292
+ msgstr ""
1293
+
1294
+ #: ../custom-contact-forms-usage-popover.php:33
1295
+ msgid ""
1296
+ "CCF is an extremely intuitive plugin allowing you to create any type of contact form you can imagine. CCF is very user friendly but with possibilities comes complexity. It is recommend that you click the button below to create default fields, field options, and forms.\n"
1297
+ " The default content will help you get a feel for the amazing things you can accomplish with this plugin. This popover only shows automatically the first time you visit the admin page;"
1298
+ msgstr ""
1299
+
1300
+ #: ../custom-contact-forms-usage-popover.php:36
1301
+ msgid "if you want to view this popover again, click the 'Show Plugin Usage Popover'"
1302
+ msgstr ""
1303
+
1304
+ #: ../custom-contact-forms-usage-popover.php:38
1305
+ msgid "in the instruction area of the admin page."
1306
+ msgstr ""
1307
+
1308
+ #: ../custom-contact-forms-usage-popover.php:44
1309
+ msgid "Below is a basic usage outline of the four pillars of this plugin: fields, field options, styles, and forms. Another useful part of the plugin is the 'Custom HTML Feature' which allows you to write the form HTML yourself using the plugin simply as a form processor; this is great if you are a web developer with HTML experience. Also explained below is the 'Saved Form Submissions' feature which displays all form submissions in the admin panel."
1310
+ msgstr ""
1311
+
1312
+ #: ../custom-contact-forms-usage-popover.php:52
1313
+ msgid "Fields are the actual input boxes in which users enter their information. There are six types of fields that you can attach to your forms.!"
1314
+ msgstr ""
1315
+
1316
+ #: ../custom-contact-forms-usage-popover.php:56
1317
+ msgid "Text:"
1318
+ msgstr ""
1319
+
1320
+ #: ../custom-contact-forms-usage-popover.php:59
1321
+ #: ../custom-contact-forms-usage-popover.php:66
1322
+ msgid "This is a text field"
1323
+ msgstr ""
1324
+
1325
+ #: ../custom-contact-forms-usage-popover.php:63
1326
+ msgid "Textarea:"
1327
+ msgstr ""
1328
+
1329
+ #: ../custom-contact-forms-usage-popover.php:70
1330
+ msgid "Dropdown:"
1331
+ msgstr ""
1332
+
1333
+ #: ../custom-contact-forms-usage-popover.php:75
1334
+ msgid "This is a dropdown field"
1335
+ msgstr ""
1336
+
1337
+ #: ../custom-contact-forms-usage-popover.php:78
1338
+ msgid "Field Option 2!"
1339
+ msgstr ""
1340
+
1341
+ #: ../custom-contact-forms-usage-popover.php:81
1342
+ msgid "Field Option 3!"
1343
+ msgstr ""
1344
+
1345
+ #: ../custom-contact-forms-usage-popover.php:84
1346
+ msgid "Field Option 4!"
1347
+ msgstr ""
1348
+
1349
+ #: ../custom-contact-forms-usage-popover.php:87
1350
+ msgid "Unlimited # of options allowed"
1351
+ msgstr ""
1352
+
1353
+ #: ../custom-contact-forms-usage-popover.php:93
1354
+ msgid "Radio:"
1355
+ msgstr ""
1356
+
1357
+ #: ../custom-contact-forms-usage-popover.php:97
1358
+ msgid "A radio field"
1359
+ msgstr ""
1360
+
1361
+ #: ../custom-contact-forms-usage-popover.php:99
1362
+ msgid "Field Option 2"
1363
+ msgstr ""
1364
+
1365
+ #: ../custom-contact-forms-usage-popover.php:101
1366
+ msgid "Field Option 3"
1367
+ msgstr ""
1368
+
1369
+ #: ../custom-contact-forms-usage-popover.php:105
1370
+ msgid "Checkbox:"
1371
+ msgstr ""
1372
+
1373
+ #: ../custom-contact-forms-usage-popover.php:109
1374
+ msgid "This is a checkbox field"
1375
+ msgstr ""
1376
+
1377
+ #: ../custom-contact-forms-usage-popover.php:113
1378
+ msgid "(advanced) Hidden:"
1379
+ msgstr ""
1380
+
1381
+ #: ../custom-contact-forms-usage-popover.php:115
1382
+ msgid "These fields are hidden (obviously), they allow you to pass hidden information within your forms. Great for using other form processors like Aweber or InfusionSoft."
1383
+ msgstr ""
1384
+
1385
+ #: ../custom-contact-forms-usage-popover.php:119
1386
+ msgid "There are a variety of different options that you can use when creating a field,"
1387
+ msgstr ""
1388
+
1389
+ #: ../custom-contact-forms-usage-popover.php:121
1390
+ msgid "denotes something required:"
1391
+ msgstr ""
1392
+
1393
+ #: ../custom-contact-forms-usage-popover.php:127
1394
+ msgid "A slug is simply a way to identify your field. It can only contain underscores, letters, and numbers and must be unique."
1395
+ msgstr ""
1396
+
1397
+ #: ../custom-contact-forms-usage-popover.php:132
1398
+ msgid "The field label is displayed next to the field and is visible to the user."
1399
+ msgstr ""
1400
+
1401
+ #: ../custom-contact-forms-usage-popover.php:137
1402
+ msgid "The six field types you can choose from are explained above."
1403
+ msgstr ""
1404
+
1405
+ #: ../custom-contact-forms-usage-popover.php:142
1406
+ msgid "This is the initial value of the field. If you set the type as checkbox, it is recommend you set this to what the checkbox is implying. For example if I were creating the checkbox 'Are you human?', I would set the initial value to 'Yes'. If you set the field type as 'Dropdown' or 'Radio', you should enter the slug of the field option you would like initially selected (or just leave it blank and the first option attached will be selected)."
1407
+ msgstr ""
1408
+
1409
+ #: ../custom-contact-forms-usage-popover.php:147
1410
+ msgid "This allows you to limit the amount of characters a user can enter in a field (does not apply to textareas as of version 3.5.5)"
1411
+ msgstr ""
1412
+
1413
+ #: ../custom-contact-forms-usage-popover.php:152
1414
+ msgid "If a field is required and a user leaves it blank, the plugin will display an error message explaining the problem. The user will then have to go back and fill in the field properly."
1415
+ msgstr ""
1416
+
1417
+ #: ../custom-contact-forms-usage-popover.php:157
1418
+ msgid "If this is filled out, a stylish tooltip popover displaying this text will show when the field is selected. This will only work if JQuery is enabled in general options."
1419
+ msgstr ""
1420
+
1421
+ #: ../custom-contact-forms-usage-popover.php:160
1422
+ msgid "Field Options:"
1423
+ msgstr ""
1424
+
1425
+ #: ../custom-contact-forms-usage-popover.php:162
1426
+ msgid "After you create a field, if it's field type is radio or dropdown, you can attach field options to the field. Field options are explained in the next section."
1427
+ msgstr ""
1428
+
1429
+ #: ../custom-contact-forms-usage-popover.php:166
1430
+ msgid "The last important thing related to fields are <span>Fixed Fields</span>. Fixed Fields are special fields that come already created within the plugin such as the captcha spam blocker and email field. Fixed Fields do special things that you wouldn't be able to accomplish with normally; they cannot be deleted or created. If you use the fixedEmail field, as opposed to creating your own email field. the users email will be checked to make sure it is valid, if it isn't a form error will be displayed."
1431
+ msgstr ""
1432
+
1433
+ #: ../custom-contact-forms-usage-popover.php:174
1434
+ msgid "In the field section above, look at the radio or dropdown fields. See how they have multiple options within the field? Those are called Field Options. Field Options have their own manager. There are only three things you must fill in to create a field option."
1435
+ msgstr ""
1436
+
1437
+ #: ../custom-contact-forms-usage-popover.php:180
1438
+ msgid "Used to identify the field option, solely for admin purposes; must be unique, and contain only letters, numbers, and underscores. Example: 'slug_one'."
1439
+ msgstr ""
1440
+
1441
+ #: ../custom-contact-forms-usage-popover.php:185
1442
+ msgid "This is what is shown to the user in the dropdown or radio field."
1443
+ msgstr ""
1444
+
1445
+ #: ../custom-contact-forms-usage-popover.php:190
1446
+ msgid "This is the actual value of the option which isn't shown to the user. This can be the same thing as the label. An example pairing of label => value is: 'The color green' => 'green' or 'Yes' => '1'. The option value is behind the scences; unseen by the user, but when a user fills out the form, the option value is what is actually emailed to you and stored in the database. For dropdown fields the option value is optional, <span>for radio fields it is required</span>."
1447
+ msgstr ""
1448
+
1449
+ #: ../custom-contact-forms-usage-popover.php:194
1450
+ msgid "Once you create field options, you can attach them (in the field manager) to radio and dropdown fields (that are already created). It is important to remember that after you create a dropdown or radio field, they will not work until you attach one or more field options."
1451
+ msgstr ""
1452
+
1453
+ #: ../custom-contact-forms-usage-popover.php:202
1454
+ msgid "Forms bring everything together. Each form you create in the form manager shows a code to display that form in posts/pages as well as theme files. The post/page form display code looks like: [customcontact id=FORMID]. There are a number of parameters that you can fill out when creating and managing each of your forms."
1455
+ msgstr ""
1456
+
1457
+ #: ../custom-contact-forms-usage-popover.php:208
1458
+ msgid "A slug is simply a way to identify your form. It can only contain underscores, letters, and numbers and must be unique. Example 'my_contact_form'"
1459
+ msgstr ""
1460
+
1461
+ #: ../custom-contact-forms-usage-popover.php:213
1462
+ msgid "The form title is heading text shown at the top of the form to users. Here's an example: 'My Contact Form'."
1463
+ msgstr ""
1464
+
1465
+ #: ../custom-contact-forms-usage-popover.php:218
1466
+ msgid "If you don't know what this is leave it as 'Post'. This allows you to change the way a form sends user information."
1467
+ msgstr ""
1468
+
1469
+ #: ../custom-contact-forms-usage-popover.php:223
1470
+ msgid "This allows you to process your forms using 3rd party services or your own scripts. If you don't know what this is, then leave it blank. This is useful if you use a service like Aweber or InfusionSoft."
1471
+ msgstr ""
1472
+
1473
+ #: ../custom-contact-forms-usage-popover.php:228
1474
+ msgid "This allows you to apply styles you create in the style manager to your forms. If you haven't created a custom style yet, just choose 'Default'."
1475
+ msgstr ""
1476
+
1477
+ #: ../custom-contact-forms-usage-popover.php:233
1478
+ msgid "Here, you can specify the text that shows on the submit button."
1479
+ msgstr ""
1480
+
1481
+ #: ../custom-contact-forms-usage-popover.php:238
1482
+ msgid "If unsure, leave blank. This field allows you to insert custom HTML directly after the starting form tag."
1483
+ msgstr ""
1484
+
1485
+ #: ../custom-contact-forms-usage-popover.php:243
1486
+ msgid "Specify the email that should receive all form submissions. If you leave this blank it will revert to the default specified in general settings."
1487
+ msgstr ""
1488
+
1489
+ #: ../custom-contact-forms-usage-popover.php:248
1490
+ msgid "Will be displayed in a popover after the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
1491
+ msgstr ""
1492
+
1493
+ #: ../custom-contact-forms-usage-popover.php:253
1494
+ msgid "Will be displayed in a popover when the form is filled out successfully when no custom success page is specified; if left blank it will use the default specified in general settings."
1495
+ msgstr ""
1496
+
1497
+ #: ../custom-contact-forms-usage-popover.php:258
1498
+ msgid "If this is filled out, users will be sent to this page when they successfully fill out the form. If it is left blank, a popover showing the form's 'success message' will be displayed on successful form submission."
1499
+ msgstr ""
1500
+
1501
+ #: ../custom-contact-forms-usage-popover.php:261
1502
+ msgid "Attach Fields:"
1503
+ msgstr ""
1504
+
1505
+ #: ../custom-contact-forms-usage-popover.php:263
1506
+ msgid "After creating a form you are given the option to attach (and dettach) fields to that specific form. Forms are useless until you attach fields."
1507
+ msgstr ""
1508
+
1509
+ #: ../custom-contact-forms-usage-popover.php:267
1510
+ msgid "The form success message and success title apply to a popover that fades in after someone successfully completes a form (that does not have a custom success URL provided). The image below will help to give you a feel to how the popover will look and where the title and message actually show up."
1511
+ msgstr ""
1512
+
1513
+ #: ../custom-contact-forms-usage-popover.php:273
1514
+ msgid "Style Manager"
1515
+ msgstr ""
1516
+
1517
+ #: ../custom-contact-forms-usage-popover.php:276
1518
+ msgid "The style manager allows you to customize the appearance of forms without any knowledge of CSS. There are a ton of parameters you can fill out with each style and all of them are pretty self-explanitory. After you create a style, you need to go to the form manager and set the form style to the new style you created (the slug will be what shows in the 'Form Style' dropdown)."
1519
+ msgstr ""
1520
+
1521
+ #: ../custom-contact-forms-usage-popover.php:279
1522
+ msgid "The image below will help you better understand how each style option will change your forms."
1523
+ msgstr ""
1524
+
1525
+ #: ../custom-contact-forms-usage-popover.php:285
1526
+ msgid "Custom HTML Forms Feature (advanced)"
1527
+ msgstr ""
1528
+
1529
+ #: ../custom-contact-forms-usage-popover.php:288
1530
+ msgid "If you know HTML and simply want to use this plugin to process form requests, this feature is for you. The following HTML is a the framework to which you must adhere. In order for your form to work you MUST do the following:"
1531
+ msgstr ""
1532
+
1533
+ #: ../custom-contact-forms-usage-popover.php:292
1534
+ msgid "Keep the form action/method the same (yes the action is supposed to be empty)."
1535
+ msgstr ""
1536
+
1537
+ #: ../custom-contact-forms-usage-popover.php:295
1538
+ msgid "Include all the hidden fields shown below."
1539
+ msgstr ""
1540
+
1541
+ #: ../custom-contact-forms-usage-popover.php:298
1542
+ msgid "Provide a hidden field with a success message or thank you page (both hidden fields are included below, you must choose one or the other and fill in the value part of the input field appropriately)."
1543
+ msgstr ""
1544
+
1545
+ #: ../custom-contact-forms-usage-popover.php:302
1546
+ msgid "Just to be clear, you don't edit the code in the Custom HTML Forms feature within the admin panel. Instead, you copy the code in to the page, post, or theme file you want to display a form, then edit the code to look how you want following the guidelines provided above."
1547
+ msgstr ""
1548
+
1549
+ #: ../custom-contact-forms-usage-popover.php:310
1550
+ msgid "This features saves each user form submission. All the fields attached to the form along with the time of submission and form URL are saved in the database and displayed in a stylish format in the admin panel."
1551
+ msgstr ""
1552
+
1553
+ #: ../custom-contact-forms-usage-popover.php:318
1554
+ msgid ""
1555
+ "Import/export is a new feature that allows you to transfer forms, fields, field options, styles and everything else saved by the plugin between Wordpress installations. Clicking the Export All button will create a .SQL file for download. With the .SQL export file you can use the importer within the CCF plugin admin page to import the .SQL file. The built-in importer is completely safe as long as you only import files that have been generated by the CCF exporter. \n"
1556
+ " You can also use PHPMyAdmin or any other MySQL database administration tool to run the import file. Importing a .SQL file will never overwrite any existing data. \n"
1557
+ " It is strongly recommended that you import CCF .SQL files using the built-in importer with in the admin panel due to the added complexity of importing using alterative methods.\n"
1558
+ " If you are importing without using the built-in importer (such as PHPMyAdmin), then note the following: You should only run the import file on Wordpress installations that already have Custom Contact Forms installed; also you will need to change the table prefix for each query within the .SQL file."
1559
+ msgstr ""
1560
+
1561
+ #: ../custom-contact-forms-widget.php:42
1562
+ msgid "Choose a Form:"
1563
+ msgstr ""
1564
+
1565
+ #: ../custom-contact-forms-widget.php:53
1566
+ msgid "Create a Form"
1567
+ msgstr ""
1568
+
1569
+ #: ../custom-contact-forms.php:113
1570
+ msgid "Attaching"
1571
+ msgstr ""
1572
+
1573
+ #: ../custom-contact-forms.php:114
1574
+ msgid "Dettaching"
1575
+ msgstr ""
1576
+
1577
+ #: ../custom-contact-forms.php:115
1578
+ msgid "Saving"
1579
+ msgstr ""
1580
+
1581
+ #: ../custom-contact-forms.php:116
1582
+ msgid "More Options"
1583
+ msgstr ""
1584
+
1585
+ #: ../custom-contact-forms.php:117
1586
+ msgid "Expand"
1587
+ msgstr ""
1588
+
1589
+ #: ../custom-contact-forms.php:118
1590
+ msgid "Click to Confirm"
1591
+ msgstr ""
1592
+
1593
+ #: ../custom-contact-forms.php:119
1594
+ msgid "Are you sure you want to delete this"
1595
+ msgstr ""
1596
+
1597
+ #: ../custom-contact-forms.php:120
1598
+ msgid "An error has occured. Please try again later."
1599
+ msgstr ""
1600
+
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.taylorlovett.com
4
  Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
5
  Requires at least: 2.8.1
6
  Tested up to: 3.0.1
7
- Stable tag: 3.5.10
8
 
9
  Gauranteed to be the most customizable and intuitive contact form plugin for Wordpress.
10
 
@@ -14,12 +14,17 @@ Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact
14
 
15
  Special Features:
16
  ------------------
 
17
 
 
 
 
18
  * The most customizable form plugin for Wordpress, guaranteed
19
  * Create __unlimited__ forms
20
  * Create __unlimited__ fields
21
  * Required Fields (New!)
22
- * Create text fields, textareas, checkboxes, radio __(new)__ and dropdown __(new)__ fields!
 
23
  * Custom HTML Forms Feature - if you are a web developer you can write your own form html and __use this plugin simply to process your form requests__. Comes with a few useful features.
24
  * __Displays forms in theme files__ as well as pages and posts.
25
  * Set a different destination email address for each form
@@ -42,6 +47,8 @@ Special Features:
42
  * Manage options for your dropdowns and radio fields in an easy to use manager
43
  * Popover forms with Jquery (Coming soon!)
44
  * Free unlimited support
 
 
45
  * Ability to disable JQuery if it is conflicting with other plugins.
46
 
47
  == Installation ==
@@ -76,24 +83,20 @@ Visit http://www.taylorlovett.com/wordpress-plugins for screenshots. Right now a
76
 
77
  == Changelog ==
78
 
79
- = 3.5.10 =
80
- * custom-contact-forms.php - Form page added to email body
81
- * image.php - Variable constant bug fixed
82
-
83
- = 3.5.9 =
84
- * custom-contact-forms.php - Captcha display bug fixed, rate me message added
85
- * css/custom-contact-forms-admin.css - Rate me style added
86
-
87
- = 3.5.8 =
88
- * custom-contact-forms-db.php - Table cache added and columnExists function redone to fix compadibility issues
89
-
90
- = 3.5.7 =
91
- * custom-contact-forms.php - fixed home page form redirect bug
92
- * css/custom-contact-forms-admin.css - manager tables restyled
93
-
94
- = 3.5.6 =
95
- * custom-contact-forms.php - fixed email field will set reply to on emails
96
- * custom-contact-forms-mailer.php - fixed email set as reply to on outgoing form emails
97
 
98
  = 3.5.5 =
99
  * custom-contact-forms.php - Plugin usage popover reworded
4
  Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
5
  Requires at least: 2.8.1
6
  Tested up to: 3.0.1
7
+ Stable tag: 4.0.0.b5
8
 
9
  Gauranteed to be the most customizable and intuitive contact form plugin for Wordpress.
10
 
14
 
15
  Special Features:
16
  ------------------
17
+ Custom Contact Forms 4.0 will revolutionize the idea of a Wordpress plugin.
18
 
19
+ * __NEW__ - All form submissions saved and displayed in admin panel as well as emailed to you
20
+ * __NEW__ - Import and export forms/fields/styles/etc. with ease!
21
+ * __NEW__ - This plugin can now be translated in to different languages.
22
  * The most customizable form plugin for Wordpress, guaranteed
23
  * Create __unlimited__ forms
24
  * Create __unlimited__ fields
25
  * Required Fields (New!)
26
+ *
27
+ * Create text fields, textareas, checkboxs, radio __(new)__ and dropdown __(new)__ fields!
28
  * Custom HTML Forms Feature - if you are a web developer you can write your own form html and __use this plugin simply to process your form requests__. Comes with a few useful features.
29
  * __Displays forms in theme files__ as well as pages and posts.
30
  * Set a different destination email address for each form
47
  * Manage options for your dropdowns and radio fields in an easy to use manager
48
  * Popover forms with Jquery (Coming soon!)
49
  * Free unlimited support
50
+ * AJAX enabled admin panel
51
+ * Assign different CSS classes to each field.
52
  * Ability to disable JQuery if it is conflicting with other plugins.
53
 
54
  == Installation ==
83
 
84
  == Changelog ==
85
 
86
+ = 4.0.0 =
87
+ * custom-contact-forms.php - Saved form submissions manager, form background color added to style manager, import/export feature
88
+ * custom-contact-forms-user-data.php - Saved form submission
89
+ * custom-contact-forms-db.php - DB methods reorganized for efficiency
90
+ * custom-contact-forms-static.php - Methods added/removed for efficiency
91
+ * custom-contact-forms-admin.php - Admin code seperated in to a different file
92
+ * custom-contact-forms-popover.php - Popover code seperated in to a different file
93
+ * custom-contact-forms-export.php - Functions for importing and exporting
94
+ * css/custom-contact-forms-admin.css - AJAX abilities added
95
+ * css/custom-contact-forms-standard.css - Classes renamed
96
+ * js/custom-contact-forms-admin.js - AJAX abilities added to admin panel
97
+ * download.php - Allows export file to be downloaded
98
+ * lang/custom-contact-forms.po - Allows for translation to different languages
99
+ * lang/custom-contact-forms.mo - Allows for translation to different languages
 
 
 
 
100
 
101
  = 3.5.5 =
102
  * custom-contact-forms.php - Plugin usage popover reworded