Visual Form Builder - Version 2.2

Version Description

Updated Form Settings UI. Additional SPAM hardening, new inline help tooltips, file uploads now added to Media Library, and a lot more!

Download this release

Release Info

Developer mmuro
Plugin Icon 128x128 Visual Form Builder
Version 2.2
Comparing to
See all releases

Code changes from version 2.1 to 2.2

class-entries-detail.php CHANGED
@@ -136,6 +136,8 @@ class VisualFormBuilder_Entries_Detail{
136
  case 'fieldset' :
137
  case 'section' :
138
  case 'submit' :
 
 
139
  break;
140
 
141
  default :
136
  case 'fieldset' :
137
  case 'section' :
138
  case 'submit' :
139
+ case 'verification' :
140
+ case 'secret' :
141
  break;
142
 
143
  default :
css/arrows.png CHANGED
Binary file
css/nav-menu.css CHANGED
@@ -1 +1 @@
1
- html,body{min-width:950px}#nav-menus-frame{margin-left:300px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:24px}.no-js #wpbody-content #menu-settings-column{padding-top:31px}#menu-settings-column .inside{clear:both}.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}#menu-management-liquid{float:left;min-width:100%}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%}#menu-management .menu-edit{border:1px solid;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;margin-bottom:20px}#post-body{padding:10px;border-width:1px 0;border-style:solid}#nav-menu-header,#nav-menu-footer{padding:0 10px}#nav-menu-header{border-bottom:1px solid}#nav-menu-footer{border-top:1px solid}#post-body div.updated,#post-body div.error{margin:0}#post-body-content{position:relative}#menu-management .menu-add-new abbr{font-weight:bold}#menu-management .nav-tabs-nav{margin:0 20px}#menu-management .nav-tabs-arrow{width:10px;padding:0 5px 4px;cursor:pointer;position:absolute;top:0;line-height:22px;font-size:18px;text-shadow:0 1px 0 #fff}#menu-management .nav-tabs-arrow-left{left:0}#menu-management .nav-tabs-arrow-right{right:0;text-align:right}#menu-management .nav-tabs-wrapper{width:100%;height:28px;margin-bottom:-1px;overflow:hidden}#menu-management .nav-tabs{padding-left:20px;padding-right:10px}.js #menu-management .nav-tabs{float:left;margin-left:0;margin-right:-400px}#menu-management .nav-tab{margin-bottom:0;font-size:14px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif}#select-nav-menu-container{text-align:right;padding:0 10px 3px 10px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}#wpbody .open-label{display:block;float:left}#wpbody .open-label span{padding-right:10px}.js .input-with-default-title{font-style:italic}#menu-management .inside{padding:0 10px}.postbox .howto input{width:180px;float:right}.customlinkdiv .howto input{width:200px}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:right}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.meta-sep,.submitdelete,.submitcancel{display:block;float:left;font-size:12px;margin:4px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;font-size:12px;margin-left:20px;margin-top:5px}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.postbox img.waiting{display:none;vertical-align:middle}.button-controls{clear:both;margin:10px 0}.show-all,.hide-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px}#manage-menu .inside{padding:0}#available-links dt{display:block}#add-custom-link .howto{font-size:12px}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px}.menu-item-textbox{width:180px}.howto span{margin-top:4px;display:block;float:left}.quick-search{width:190px}.list-wrap{display:none;clear:both;margin-bottom:10px}.list-container{max-height:200px;overflow-y:auto;padding:10px 10px 5px;border:1px solid;-moz-border-radius:3px}.postbox p.submit{margin-bottom:0}.list li{display:none;margin:0;margin-bottom:5px}.list li .menu-item-title{cursor:pointer;display:block}.list li .menu-item-title input{margin-right:3px;margin-top:-3px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{padding:1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative;opacity:1.0}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin-top:13px}.menu-item-handle{border:1px solid #dfdfdf;position:relative;padding-left:10px;height:auto;width:400px;line-height:35px;text-shadow:0 1px 0 #fff;overflow:hidden;word-wrap:break-word;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}#menu-to-edit .menu-item-invalid .menu-item-handle{background-color:#f6c9cc;background-image:-ms-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-moz-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-o-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-webkit-gradient(linear,left bottom,left top,from(#f6c9cc),to(#fdf8ff));background-image:-webkit-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:linear-gradient(bottom,#f6c9cc,#fdf8ff)}.menu-item-edit-active .menu-item-handle{-moz-border-radius:3px 3px 0 0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-khtml-border-bottom-right-radius:0;-khtml-border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}.menu li.deleting .menu-item-handle{background-image:none;text-shadow:0}.menu-item-handle .item-title{font-size:12px;font-weight:bold;padding:7px 0;line-height:20px;display:block;margin-right:13em}li.menu-item.ui-sortable-helper dl{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport dl{margin-top:13px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:13px}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:30px}.menu-item-depth-2{margin-left:60px}.menu-item-depth-3{margin-left:90px}.menu-item-depth-4{margin-left:120px}.menu-item-depth-5{margin-left:150px}.menu-item-depth-6{margin-left:180px}.menu-item-depth-7{margin-left:210px}.menu-item-depth-8{margin-left:240px}.menu-item-depth-9{margin-left:270px}.menu-item-depth-10{margin-left:300px}.menu-item-depth-11{margin-left:330px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-30px}.menu-item-depth-2 .menu-item-transport{margin-left:-60px}.menu-item-depth-3 .menu-item-transport{margin-left:-90px}.menu-item-depth-4 .menu-item-transport{margin-left:-120px}.menu-item-depth-5 .menu-item-transport{margin-left:-150px}.menu-item-depth-6 .menu-item-transport{margin-left:-180px}.menu-item-depth-7 .menu-item-transport{margin-left:-210px}.menu-item-depth-8 .menu-item-transport{margin-left:-240px}.menu-item-depth-9 .menu-item-transport{margin-left:-270px}.menu-item-depth-10 .menu-item-transport{margin-left:-300px}.menu-item-depth-11 .menu-item-transport{margin-left:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{font-size:12px;padding-right:10px}.item-controls{font-size:12px;position:absolute;right:20px;top:0}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-right:10px}.item-controls .item-order a{font-weight:bold}body.js .item-order{display:none}.item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:36px;overflow:hidden;text-indent:-999em;background:url("arrows.png") no-repeat scroll 8px 10px transparent}.item-edit:hover{background:url("arrows.png") no-repeat scroll 8px 10px transparent}.item-edit.opened{background:url("arrows.png") no-repeat scroll 8px -25px transparent}.item-edit.opened:hover{background:url("arrows.png") no-repeat scroll 8px -149px transparent}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:400px;padding:10px 0 10px 10px;border:solid;border-width:0 1px 1px 1px;-moz-border-radius:0 0 3px 3px;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-right-radius:3px;-khtml-border-bottom-left-radius:3px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em auto;text-align:center}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;font-size:12px;font-style:italic;border:1px solid;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}.link-to-original a{padding-left:4px;font-style:normal}.hidden-field{display:none}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left}.description-thin{width:190px;height:40px}.description-wide{width:390px}.menu-item-actions{padding-top:15px}#cancel-save{cursor:pointer}.major-publishing-actions{clear:both;padding:3px 0 5px}.major-publishing-actions .publishing-action{text-align:right;float:right;line-height:23px;margin:5px 0 1px}.major-publishing-actions .delete-action{vertical-align:middle;text-align:left;float:left;padding-right:15px;margin-top:5px}.menu-name-label span,.auto-add-pages label{font-size:12px;font-style:normal}.menu-name-label{margin-right:15px}.auto-add-pages input{margin-top:0}.auto-add-pages{margin-top:4px;float:left}.submitbox .submitcancel{border-bottom:1px solid;padding:1px 2px;text-decoration:none}.major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}#menu-item-name-wrap:after,#menu-item-url-wrap:after,#menu-name-label:after,#menu-settings-column .inside:after,#nav-menus-frame:after,#post-body-content:after,.button-controls:after,.major-publishing-actions:after,.menu-item-settings:after{clear:both;content:".";display:block;height:0;visibility:hidden}#nav-menus-frame,.button-controls,#menu-item-url-wrap,#menu-item-name-wrap{display:block}.option .widefat{width:345px;margin:0 6px 7px 0}.addOption,.deleteOption,.addEmail,.deleteEmail{background:url('sprite.png') -12px -650px no-repeat transparent;text-indent:-9999px;width:16px;height:16px;display:inline-block}.deleteOption,.deleteEmail{background-position:-12px -677px}.addEmail,.deleteEmail{margin-top:5px}.ui-state-disabled .menu-item-handle{cursor:default}.ui-state-disabled .menu-item-handle{background-image:-moz-linear-gradient(top,#fff 0,#bbb 100%);background-image:-o-linear-gradient(top,#fff 0,#bbb 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(1,#bbb));background-image:linear-gradient(top,#fff 0,#bbb 100%)}
1
+ html,body{min-width:950px}#nav-menus-frame{margin-left:300px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:24px}.no-js #wpbody-content #menu-settings-column{padding-top:31px}#menu-settings-column .inside{clear:both}.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}#menu-management-liquid{float:left;min-width:100%}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%}#menu-management .menu-edit{border:1px solid;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;margin-bottom:20px}#post-body{padding:10px;border-width:1px 0;border-style:solid}#nav-menu-header,#nav-menu-footer{padding:0 10px}#nav-menu-header{border-bottom:1px solid}#nav-menu-footer{border-top:1px solid}#post-body div.updated,#post-body div.error{margin:0}#post-body-content{position:relative}#menu-management .menu-add-new abbr{font-weight:bold}#menu-management .nav-tabs-nav{margin:0 20px}#menu-management .nav-tabs-arrow{width:10px;padding:0 5px 4px;cursor:pointer;position:absolute;top:0;line-height:22px;font-size:18px;text-shadow:0 1px 0 #fff}#menu-management .nav-tabs-arrow-left{left:0}#menu-management .nav-tabs-arrow-right{right:0;text-align:right}#menu-management .nav-tabs-wrapper{width:100%;height:28px;margin-bottom:-1px;overflow:hidden}#menu-management .nav-tabs{padding-left:20px;padding-right:10px}.js #menu-management .nav-tabs{float:left;margin-left:0;margin-right:-400px}#menu-management .nav-tab{margin-bottom:0;font-size:14px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif}#select-nav-menu-container{text-align:right;padding:0 10px 3px 10px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}#wpbody .open-label{display:block;float:left}#wpbody .open-label span{padding-right:10px}.js .input-with-default-title{font-style:italic}#menu-management .inside{padding:0 10px}.postbox .howto input{width:180px;float:right}.customlinkdiv .howto input{width:200px}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:right}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.meta-sep,.submitdelete,.submitcancel{display:block;float:left;font-size:12px;margin:4px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;font-size:12px;margin-left:20px;margin-top:5px}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.postbox img.waiting{display:none;vertical-align:middle}.button-controls{clear:both;margin:10px 0}.show-all,.hide-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px}#manage-menu .inside{padding:0}#available-links dt{display:block}#add-custom-link .howto{font-size:12px}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px}.menu-item-textbox{width:180px}.howto span{margin-top:4px;display:block;float:left}.quick-search{width:190px}.list-wrap{display:none;clear:both;margin-bottom:10px}.list-container{max-height:200px;overflow-y:auto;padding:10px 10px 5px;border:1px solid;-moz-border-radius:3px}.postbox p.submit{margin-bottom:0}.list li{display:none;margin:0;margin-bottom:5px}.list li .menu-item-title{cursor:pointer;display:block}.list li .menu-item-title input{margin-right:3px;margin-top:-3px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{padding:1em 0;width:465px}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative;opacity:1.0}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin-top:13px}.menu-item-handle{border:1px solid #dfdfdf;position:relative;padding-left:10px;height:auto;width:400px;line-height:35px;text-shadow:0 1px 0 #fff;overflow:hidden;word-wrap:break-word;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}#menu-to-edit .menu-item-invalid .menu-item-handle{background-color:#f6c9cc;background-image:-ms-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-moz-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-o-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-webkit-gradient(linear,left bottom,left top,from(#f6c9cc),to(#fdf8ff));background-image:-webkit-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:linear-gradient(bottom,#f6c9cc,#fdf8ff)}.menu-item-edit-active .menu-item-handle{-moz-border-radius:3px 3px 0 0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-khtml-border-bottom-right-radius:0;-khtml-border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}.menu li.deleting .menu-item-handle{background-image:none;text-shadow:0}.menu-item-handle .item-title{font-size:12px;font-weight:bold;padding:7px 0;line-height:20px;display:block;margin-right:13em}li.menu-item.ui-sortable-helper dl{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport dl{margin-top:13px}.menu .sortable-placeholder{height:35px;min-height:35px;width:410px;margin-top:13px}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:30px}.menu-item-depth-2{margin-left:60px}.menu-item-depth-3{margin-left:90px}.menu-item-depth-4{margin-left:120px}.menu-item-depth-5{margin-left:150px}.menu-item-depth-6{margin-left:180px}.menu-item-depth-7{margin-left:210px}.menu-item-depth-8{margin-left:240px}.menu-item-depth-9{margin-left:270px}.menu-item-depth-10{margin-left:300px}.menu-item-depth-11{margin-left:330px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-30px}.menu-item-depth-2 .menu-item-transport{margin-left:-60px}.menu-item-depth-3 .menu-item-transport{margin-left:-90px}.menu-item-depth-4 .menu-item-transport{margin-left:-120px}.menu-item-depth-5 .menu-item-transport{margin-left:-150px}.menu-item-depth-6 .menu-item-transport{margin-left:-180px}.menu-item-depth-7 .menu-item-transport{margin-left:-210px}.menu-item-depth-8 .menu-item-transport{margin-left:-240px}.menu-item-depth-9 .menu-item-transport{margin-left:-270px}.menu-item-depth-10 .menu-item-transport{margin-left:-300px}.menu-item-depth-11 .menu-item-transport{margin-left:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{font-size:12px;padding-right:10px}.item-controls{font-size:12px;position:absolute;right:20px;top:0}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-right:10px}.item-controls .item-order a{font-weight:bold}body.js .item-order{display:none}.item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:36px;overflow:hidden;text-indent:-999em;background:url("arrows.png") no-repeat scroll 8px 10px transparent}.item-edit:hover{background:url("arrows.png") no-repeat scroll 8px 10px transparent}.item-edit.opened{background:url("arrows.png") no-repeat scroll 8px -25px transparent}.item-edit.opened:hover{background:url("arrows.png") no-repeat scroll 8px -149px transparent}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:400px;padding:10px 0 10px 10px;border:solid;border-width:0 1px 1px 1px;-moz-border-radius:0 0 3px 3px;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-right-radius:3px;-khtml-border-bottom-left-radius:3px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em auto;text-align:center}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;font-size:12px;font-style:italic;border:1px solid;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}.link-to-original a{padding-left:4px;font-style:normal}.hidden-field{display:none}#form-settings .description-thin{margin:12px 10px 12px 0}.description-thin,.description-wide{margin-right:10px;float:left}.description-thin{width:190px;height:40px}.description-wide{width:390px}.menu-item-actions{padding-top:15px}#cancel-save{cursor:pointer}.major-publishing-actions{clear:both;padding:3px 0 5px}.major-publishing-actions .publishing-action{text-align:right;float:right;line-height:23px;margin:10px 0 1px}.major-publishing-actions .delete-action{vertical-align:middle;text-align:left;float:left;padding-right:15px;margin-top:5px}.menu-name-label span,.auto-add-pages label{font-size:12px;font-style:normal}.menu-name-label{margin-right:15px}.auto-add-pages input{margin-top:0}.auto-add-pages{margin-top:4px;float:left}.submitbox .submitcancel{border-bottom:1px solid;padding:1px 2px;text-decoration:none}.major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}#menu-item-name-wrap:after,#menu-item-url-wrap:after,#menu-name-label:after,#menu-settings-column .inside:after,#nav-menus-frame:after,#post-body-content:after,.button-controls:after,.major-publishing-actions:after,.menu-item-settings:after{clear:both;content:".";display:block;height:0;visibility:hidden}#nav-menus-frame,.button-controls,#menu-item-url-wrap,#menu-item-name-wrap{display:block}.option .widefat{width:345px;margin:0 6px 7px 0}.addOption,.deleteOption,.addEmail,.deleteEmail{background:url('sprite.png') -12px -650px no-repeat transparent;text-indent:-9999px;width:16px;height:16px;display:inline-block}.deleteOption,.deleteEmail{background-position:-12px -677px}.addEmail,.deleteEmail{margin-top:5px}.ui-state-disabled .menu-item-handle{cursor:default}.ui-state-disabled .menu-item-handle{background-image:-moz-linear-gradient(top,#fff 0,#bbb 100%);background-image:-o-linear-gradient(top,#fff 0,#bbb 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(1,#bbb));background-image:linear-gradient(top,#fff 0,#bbb 100%)}
css/visual-form-builder-admin.css CHANGED
@@ -1 +1 @@
1
- label.error{color:red;display:block}#visual-form-builder-update input.error,#visual-form-builder-update textarea.error,#visual-form-builder-update select.error{border:1px solid red}.menu-item-handle.fieldset,#form-element-fieldset{background-image:-moz-linear-gradient(top,#e3e3e3 0,#ccc 100%);background-image:-o-linear-gradient(top,#e3e3e3 0,#ccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#e3e3e3),color-stop(1,#ccc));background-image:linear-gradient(top,#e3e3e3 0,#ccc 100%);box-shadow:0 1px 0 #e3e3e3 inset}.sender-labels{width:80px}.is-field-required{color:#bc1212;vertical-align:middle}.visual-form-builder-inline-edit{width:100%}.visual-form-builder-inline-edit-col{padding:0 .5em}.visual-form-builder-inline-edit label{display:block;margin:.2em 0}.visual-form-builder-inline-edit .title{display:block;float:left;width:5em;font-style:italic}.visual-form-builder-inline-edit .input-text-wrap{display:block;margin-left:5em}.visual-form-builder-inline-edit .input-text-wrap input[type="text"]{width:100%;border:#DDD solid 1px;border-radius:3px}.subsubsub{float:none}.nav-tabs-arrow-left{display:none}#form-items input{width:104px;float:left;margin:0 5px 10px 0}#form-element-text{background:url(sprite.png) 0 -89px no-repeat transparent}#form-element-textarea{background:url(sprite.png) 0 -173px no-repeat transparent}#form-element-checkbox{background:url(sprite.png) 0 -259px no-repeat transparent}#form-element-radio{background:url(sprite.png) 0 -51px no-repeat transparent}#form-element-select{background:url(sprite.png) 0 -7px no-repeat transparent}#form-element-address{background:url(sprite.png) 0 -129px no-repeat transparent}#form-element-datepicker{background:url(sprite.png) 0 -215px no-repeat transparent}#form-element-email{background:url(sprite.png) 0 -304px no-repeat transparent}#form-element-url{background:url(sprite.png) 0 -356px no-repeat transparent}#form-element-currency{background:url(sprite.png) 0 -405px no-repeat transparent}#form-element-digits{background:url(sprite.png) 0 -452px no-repeat transparent}#form-element-time{background:url(sprite.png) 0 -489px no-repeat transparent}#form-element-phone{background:url(sprite.png) 0 -529px no-repeat transparent}#form-element-html{background:url(sprite.png) 0 -559px no-repeat transparent}#form-element-file{background:url(sprite.png) 0 -587px no-repeat transparent}#form-element-instructions{background:url(sprite.png) 0 -621px no-repeat transparent}#form-element-section{background:url(sprite.png) 0 -809px no-repeat transparent}#form-details-nav{font-size:1.0em;font-weight:bold;padding-top:10px}#form-details-nav a{padding:5px 10px;text-decoration:none}#form-details-nav a.current{background-color:#777;background-image:-ms-linear-gradient(bottom,#6d6d6d,#808080);background-image:-moz-linear-gradient(bottom,#6d6d6d,#808080);background-image:-o-linear-gradient(bottom,#6d6d6d,#808080);background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(#808080));background-image:-webkit-linear-gradient(bottom,#6d6d6d,#808080);background-image:linear-gradient(bottom,#6d6d6d,#808080);color:white;border-radius:5px;height:40px;text-shadow:0 -1px 0 #333;border-color:#dfdfdf}.form-details,#form-success-message-text,#form-success-message-page,#form-success-message-redirect{display:none}.form-details-current,.active{display:block}#confirmation-message textarea,#notification textarea{font-family:Consolas,Monaco,monospace;width:75%;height:10em;margin-top:10px}#form-success-message-page,#form-success-message-redirect{margin-top:10px}.post-body-plain ol li{list-style:decimal}#promote-vfb li{padding-left:20px}#promote-vfb #twitter{background:url(sprite.png) -10px -746px no-repeat transparent}#promote-vfb #star{background:url(sprite.png) -10px -710px no-repeat transparent}#promote-vfb #paypal{background:url(sprite.png) -10px -777px no-repeat transparent}.menu .ui-nestedSortable-error{background-color:#fbe3e4;border-color:red;color:#8a1f11}ul#menu-to-edit ul{margin:0 0 0 25px;padding:0;list-style-type:none;width:98%}.vfb-details{padding:0 10px;border:1px solid #ccc;margin-bottom:10px;border-radius:3px;width:95%}.vfb-details.section{background-color:#efefef;width:97.55%}.vfb-details .postbox{min-height:60px}#poststuff .vfb-details h2{margin-top:0}#poststuff h3.section-heading{padding-left:0}.vfb-pro-call-to-action a{text-decoration:none}.vfb-pro-call-to-action:hover{border-color:#dbf1ff}.vfb-pro-call-to-action{background-color:#3d93cd;border:5px solid #b0d2e8;border-radius:7px;box-shadow:inset 1px 1px 5px #398cc3,inset -1px -25px 5px #398cc3,0px 0 0 #fff;height:37px;margin:0 auto;padding:5px 30px 10px 30px;text-shadow:0 1px #2b658c;width:115px;line-height:22px}.vfb-pro-call-to-action .cta-sign-up{color:#fff;display:block;font-size:24px;font-weight:bold;text-align:center;text-decoration:none;text-shadow:1px 1px 1px #2b658c;width:100%;line-height:22px}.vfb-pro-call-to-action .cta-price{color:#ace7ff;display:block;font-size:12px;font-weight:normal;line-height:20px;text-align:center;text-decoration:none;width:100%;line-height:20px}.vfb-pro-upgrade{width:350px;float:left;padding:10px;background-color:#d3e7ee;border:1px solid #21759b;border-radius:5px}.vfb-pro-upgrade ul{list-style:outside;margin-left:10px}.post-body-plain{width:430px;float:left}#menu-instructions.post-body-plain{width:auto;float:none}
1
+ label.error{color:red;display:block}#visual-form-builder-update input.error,#visual-form-builder-update textarea.error,#visual-form-builder-update select.error{border:1px solid red}.menu-item-handle.fieldset,#form-element-fieldset{background-image:-moz-linear-gradient(top,#e3e3e3 0,#ccc 100%);background-image:-o-linear-gradient(top,#e3e3e3 0,#ccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#e3e3e3),color-stop(1,#ccc));background-image:linear-gradient(top,#e3e3e3 0,#ccc 100%);box-shadow:0 1px 0 #e3e3e3 inset}.sender-labels{width:80px}.is-field-required{color:#bc1212;vertical-align:middle}.visual-form-builder-inline-edit{width:100%}.visual-form-builder-inline-edit-col{padding:0 .5em}.visual-form-builder-inline-edit label{display:block;margin:.2em 0}.visual-form-builder-inline-edit .title{display:block;float:left;width:5em;font-style:italic}.visual-form-builder-inline-edit .input-text-wrap{display:block;margin-left:5em}.visual-form-builder-inline-edit .input-text-wrap input[type="text"]{width:100%;border:#DDD solid 1px;border-radius:3px}.subsubsub{float:none}.nav-tabs-arrow-left{display:none}#form-items input{width:104px;float:left;margin:0 5px 10px 0}#form-element-text{background:url(sprite.png) 0 -89px no-repeat transparent}#form-element-textarea{background:url(sprite.png) 0 -173px no-repeat transparent}#form-element-checkbox{background:url(sprite.png) 0 -259px no-repeat transparent}#form-element-radio{background:url(sprite.png) 0 -51px no-repeat transparent}#form-element-select{background:url(sprite.png) 0 -7px no-repeat transparent}#form-element-address{background:url(sprite.png) 0 -129px no-repeat transparent}#form-element-datepicker{background:url(sprite.png) 0 -215px no-repeat transparent}#form-element-email{background:url(sprite.png) 0 -304px no-repeat transparent}#form-element-url{background:url(sprite.png) 0 -356px no-repeat transparent}#form-element-currency{background:url(sprite.png) 0 -405px no-repeat transparent}#form-element-digits{background:url(sprite.png) 0 -452px no-repeat transparent}#form-element-time{background:url(sprite.png) 0 -489px no-repeat transparent}#form-element-phone{background:url(sprite.png) 0 -529px no-repeat transparent}#form-element-html{background:url(sprite.png) 0 -559px no-repeat transparent}#form-element-file{background:url(sprite.png) 0 -587px no-repeat transparent}#form-element-instructions{background:url(sprite.png) 0 -621px no-repeat transparent}#form-element-section{background:url(sprite.png) 0 -809px no-repeat transparent}#form-details-nav{font-size:1.0em;font-weight:bold;padding-top:10px}#form-details-nav a{padding:5px 10px;text-decoration:none}#form-details-nav a.current{background-color:#777;background-image:-ms-linear-gradient(bottom,#6d6d6d,#808080);background-image:-moz-linear-gradient(bottom,#6d6d6d,#808080);background-image:-o-linear-gradient(bottom,#6d6d6d,#808080);background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(#808080));background-image:-webkit-linear-gradient(bottom,#6d6d6d,#808080);background-image:linear-gradient(bottom,#6d6d6d,#808080);color:white;border-radius:5px;height:40px;text-shadow:0 -1px 0 #333;border-color:#dfdfdf}.form-details,#form-success-message-text,#form-success-message-page,#form-success-message-redirect{display:none}.form-details-current,.active{display:block}#confirmation-message textarea,#notification textarea{font-family:Consolas,Monaco,monospace;width:75%;height:10em;margin-top:10px}#form-success-message-page,#form-success-message-redirect{margin-top:10px}.post-body-plain ol li{list-style:decimal}#promote-vfb li{padding-left:20px}#promote-vfb #twitter{background:url(sprite.png) -10px -746px no-repeat transparent}#promote-vfb #star{background:url(sprite.png) -10px -710px no-repeat transparent}#promote-vfb #paypal{background:url(sprite.png) -10px -777px no-repeat transparent}.menu .ui-nestedSortable-error{background-color:#fbe3e4;border-color:red;color:#8a1f11}ul#menu-to-edit ul{margin:0 0 0 25px;padding:0;list-style-type:none;width:98%}.vfb-details{padding:0 10px;border:1px solid #ccc;margin-bottom:10px;border-radius:3px;width:95%}.vfb-details.section{background-color:#efefef;width:97.55%}.vfb-details .postbox{min-height:60px}#poststuff .vfb-details h2{margin-top:0}#poststuff h3.section-heading{padding-left:0}.vfb-pro-call-to-action a{text-decoration:none}.vfb-pro-call-to-action:hover{border-color:#dbf1ff}.vfb-pro-call-to-action{background-color:#3d93cd;border:5px solid #b0d2e8;border-radius:7px;box-shadow:inset 1px 1px 5px #398cc3,inset -1px -25px 5px #398cc3,0px 0 0 #fff;height:37px;margin:0 auto;padding:5px 30px 10px 30px;text-shadow:0 1px #2b658c;width:115px;line-height:22px}.vfb-pro-call-to-action .cta-sign-up{color:#fff;display:block;font-size:24px;font-weight:bold;text-align:center;text-decoration:none;text-shadow:1px 1px 1px #2b658c;width:100%;line-height:22px}.vfb-pro-call-to-action .cta-price{color:#ace7ff;display:block;font-size:12px;font-weight:normal;line-height:20px;text-align:center;text-decoration:none;width:100%;line-height:20px}.vfb-pro-upgrade{width:350px;float:left;padding:10px;background-color:#d3e7ee;border:1px solid #21759b;border-radius:5px}.vfb-pro-upgrade ul{list-style:outside;margin-left:10px}.post-body-plain{width:430px;float:left}#menu-instructions.post-body-plain{width:auto;float:none}.vfb-button{position:relative;overflow:visible;display:inline-block;border:1px solid #d4d4d4;margin:0;padding:.5em 2.5em .5em 1em;text-decoration:none;text-shadow:1px 1px 0 #fff;font:12px/normal sans-serif;color:#333;white-space:nowrap;cursor:pointer;outline:0;background-color:#ececec;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f4f4f4),to(#ececec));background-image:-moz-linear-gradient(#f4f4f4,#ececec);background-image:-o-linear-gradient(#f4f4f4,#ececec);background-image:linear-gradient(#f4f4f4,#ececec);-webkit-background-clip:padding;-moz-background-clip:padding;-o-background-clip:padding-box;-webkit-border-radius:.2em;-moz-border-radius:.2em;border-radius:.2em;zoom:1;*display:inline}.vfb-button:hover,.vfb-button:active,.vfb-button.current{border-color:#3072b3;border-bottom-color:#2a65a0;text-decoration:none;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);color:#fff;background-color:#3072b3;background-image:-webkit-gradient(linear,0 0,0 100%,from(#599bdc),to(#3072b3));background-image:-moz-linear-gradient(#599bdc,#3072b3);background-image:-o-linear-gradient(#599bdc,#3072b3);background-image:linear-gradient(#599bdc,#3072b3)}.vfb-button.current{font-weight:bold}.vfb-button::-moz-focus-inner{padding:0;border:0}.vfb-button.vfb-delete{color:#900}.vfb-button.vfb-delete:hover,.vfb-button.vfb-delete:focus,.vfb-button.vfb-delete:active{border-color:#b53f3a;border-bottom-color:#a0302a;color:#fff;background-color:#dc5f59;background-image:-webkit-gradient(linear,0 0,0 100%,from(#dc5f59),to(#b33630));background-image:-moz-linear-gradient(#dc5f59,#b33630);background-image:-o-linear-gradient(#dc5f59,#b33630);background-image:linear-gradient(#dc5f59,#b33630)}.vfb-button.vfb-delete:active,.vfb-button.vfb-delete.active{border-color:#a0302a;border-bottom-color:#bf4843;background-color:#b33630;background-image:-webkit-gradient(linear,0 0,0 100%,from(#b33630),to(#dc5f59));background-image:-moz-linear-gradient(#b33630,#dc5f59);background-image:-o-linear-gradient(#b33630,#dc5f59);background-image:linear-gradient(#b33630,#dc5f59)}.vfb-button.vfb-duplicate:hover,.vfb-button.vfb-duplicate:focus,.vfb-button.vfb-duplicate:active{border-color:#8gfc400;border-bottom-color:#8gfc400;color:#fff;background-color:#82ba0b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#7cbc0a),to(#82ba0b));background-image:-moz-linear-gradient(#7cbc0a,#82ba0b);background-image:-o-linear-gradient(#7cbc0a,#82ba0b);background-image:linear-gradient(#7cbc0a,#82ba0b)}.button-group{display:inline-block;list-style:none;margin-top:10px}.button-group .vfb-button{float:left;margin-left:-1px}.vfb-button.vfb-first{border-bottom-right-radius:0;border-top-right-radius:0}.vfb-button.vfb-last{border-bottom-left-radius:0;border-top-left-radius:0}.button-icon{width:18px;height:24px;position:absolute;top:0;right:0}.button-icon.arrow{background:url("arrows.png") no-repeat scroll 0 -118px transparent}.current .button-icon.arrow{background:url("arrows.png") no-repeat scroll 0 -30px transparent}.button-icon.plus{background:url("sprite.png") no-repeat scroll -12px -644px transparent}.button-icon.delete{background:url("sprite.png") no-repeat scroll -12px -671px transparent}#form-settings{width:460px;display:none}#form-settings.current{display:block}.form-details{padding:20px;background:rgba(255,255,255,0.5);box-shadow:0 0 0 1px rgba(155,155,155,0.3)}.form-details.on{display:block}.settings-links{background:none repeat scroll 0 0 #f5f5f5;box-shadow:0 0 0 1px rgba(155,155,155,0.3),1px 0 0 0 rgba(255,255,255,0.9) inset,0px 2px 2px rgba(0,0,0,0.1);color:#777;cursor:pointer;display:block;font-family:Arial,Helvetica,sans-serif;font-size:15px;font-weight:bold;height:25px;line-height:28px;padding:5px 15px;position:relative;text-shadow:1px 1px 1px rgba(255,255,255,0.8);text-decoration:none;text-transform:uppercase;z-index:20}.settings-links .arrow{position:absolute;width:24px;height:24px;right:13px;top:7px;background:url("arrows.png") no-repeat scroll 8px -278px transparent}.settings-links.on .arrow{background:url("arrows.png") no-repeat scroll 8px -252px transparent}.settings-links:hover,.settings-links.on{background:#c6e1ec;color:#3d7489;text-shadow:0 1px 1px rgba(255,255,255,0.6);box-shadow:0 0 0 1px rgba(155,155,155,0.3),0px 2px 2px rgba(0,0,0,0.1)}.vfb-tooltip{position:relative;float:right;cursor:pointer;width:16px;height:16px;margin-right:2px}.tooltip{text-indent:0;z-index:200;width:175px;padding:5px 20px;border-radius:5px;border:2px solid white;box-shadow:0 0 7px black;background:rgba(0,0,0,0.6);position:absolute;top:-40px;display:none;font-style:normal;color:white}.tooltip h3{font-weight:bold;font-size:16px;padding-bottom:6px;margin:5px 0;border-bottom:1px solid white}.tooltip p{font-size:12px;margin-top:10px}
css/visual-form-builder.css CHANGED
@@ -3,6 +3,7 @@ form.visual-form-builder{
3
  margin:20px 0;
4
  }
5
  form.visual-form-builder li{width:auto !important;}
 
6
  .visual-form-builder ul{
7
  list-style:none;
8
  margin:0 14px;
@@ -56,13 +57,17 @@ form.visual-form-builder li{width:auto !important;}
56
  .visual-form-builder.left-label .desc, .visual-form-builder.right-label .desc{
57
  float:left;
58
  margin:0 15px 0 0;
59
- /*width:31%;*/
60
- width:20%;
61
  }
62
  .visual-form-builder.right-label .desc{
63
  padding-top:2px;
64
  text-align:right;
65
  }
 
 
 
 
66
  label.desc{font-weight:bold;}
67
  .visual-form-builder label.choice{
68
  font-size:100%;
@@ -84,6 +89,7 @@ input.text, textarea.textarea, select.select{
84
  input.small, select.small{width:25%;}
85
  input.medium, select.medium{width:50%;}
86
  input.large, select.large, textarea.textarea{width:100%;}
 
87
  textarea.medium{height:5.5em;}
88
  textarea.medium{height:10em;}
89
  textarea.large{height:20em;}
3
  margin:20px 0;
4
  }
5
  form.visual-form-builder li{width:auto !important;}
6
+ .visual-form-builder ul li{list-style:none;}
7
  .visual-form-builder ul{
8
  list-style:none;
9
  margin:0 14px;
57
  .visual-form-builder.left-label .desc, .visual-form-builder.right-label .desc{
58
  float:left;
59
  margin:0 15px 0 0;
60
+ width:31%;
61
+ /*width:20%;*/
62
  }
63
  .visual-form-builder.right-label .desc{
64
  padding-top:2px;
65
  text-align:right;
66
  }
67
+ .visual-form-builder.left-label li div, .visual-form-builder.right-label li div{
68
+ float:left;
69
+ width:65%;
70
+ }
71
  label.desc{font-weight:bold;}
72
  .visual-form-builder label.choice{
73
  font-size:100%;
89
  input.small, select.small{width:25%;}
90
  input.medium, select.medium{width:50%;}
91
  input.large, select.large, textarea.textarea{width:100%;}
92
+ .visual-form-builder.left-label .textarea, .visual-form-builder.right-label .textarea{float:left;width:65%;}
93
  textarea.medium{height:5.5em;}
94
  textarea.medium{height:10em;}
95
  textarea.large{height:20em;}
js/visual-form-builder.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(f){f(document).on("click","a.addOption",function(v){v.preventDefault();var q=f(this).parent().parent().find(".clonedOption").length;var u=q+1;var w=f(this).closest("div").attr("id");var t=f(this).closest("div").children("label").attr("for");var p=t.replace(new RegExp(/(\d+)$/g),"");var s=w.replace(new RegExp(/(\d+)$/g),"");var r=f("#"+w).clone().attr("id",s+u);r.children("label").attr("for",p+u);r.find("input").attr("id",p+u);f("#"+s+q).after(r)});f(document).on("click","a.deleteOption",function(q){q.preventDefault();var p=f(this).parent().parent().find(".clonedOption").length;if(p-1==0){alert("You must have at least one option.")}else{f(this).closest("div").remove()}});f(document).on("click","a.addEmail",function(v){v.preventDefault();var q=f(this).parent().parent().find(".clonedOption").length;var u=q+1;var w=f(this).closest("div").attr("id");var t=f(this).closest("div").children("label").attr("for");var p=t.replace(new RegExp(/(\d+)$/g),"");var s=w.replace(new RegExp(/(\d+)$/g),"");var r=f("#"+w).clone().attr("id",s+u);r.children("label").attr("for",p+u);r.find("input").attr("id",p+u);f("#"+s+q).after(r)});f(document).on("click","a.deleteEmail",function(q){q.preventDefault();var p=f(this).parent().parent().find(".clonedOption").length;if(p-1==0){alert("You must have at least one option.")}else{f(this).closest("div").remove()}});f(".menu-delete, .entry-delete").click(function(q){q.preventDefault();var p=(f(this).hasClass("entry-delete"))?"entry":"form";var r=confirm("You are about to permanently delete this "+p+" and all of its data.\n'Cancel' to stop, 'OK' to delete.");if(r){return}});f(document).on("click","a.item-edit",function(p){p.preventDefault();f(p.target).closest("li").children(".menu-item-settings").slideToggle("fast");f(this).toggleClass("opened")});f("#form-copy-to-clipboard").focus(function(){this.select()});var e=f(".nav-tabs-wrapper"),i=e.children(".nav-tabs"),d=i.children(".nav-tab-active"),k=i.children(".nav-tab"),b=0,m,c,h={},j,a="margin-left",o="margin-right",l=2;k.each(function(){b+=f(this).outerWidth(true)});h.padding=0;h[o]=(-1*b)+"px";i.css(h);g();function g(){if(e.length){var r=e.width(),q=0,p={};c=e.offset().left;m=c+r;d.makeTabVisible(c,m,i,a,l);if(k.last().isTabVisible(c,m)){q=e.width()-b;q=q>0?0:q;p[a]=q+"px";i.animate(p,100,"linear")}if(r>b){f(".nav-tabs-arrow-right, .nav-tabs-arrow-left").hide()}else{f(".nav-tabs-arrow-right, .nav-tabs-arrow-left").show()}}}f(window).resize(function(){if(j){clearTimeout(j)}j=setTimeout(g,200)});f(".nav-tabs-arrow-right").mousedown(function(){var r=Math.abs(parseInt(i.css(a))),p=r,q={};p=Math.abs(b-e.width())-r;if(!p){return}q[a]="-="+p+"px";i.animate(q,p*l,"linear")}).mouseup(function(){i.stop(true)});f(".nav-tabs-arrow-left").mousedown(function(){var r=Math.abs(parseInt(i.css(a))),p=r,q={};if(!p){return}q[a]="+="+p+"px";i.animate(q,p*l,"linear")}).mouseup(function(){i.stop(true)});f("#menu-to-edit").nestedSortable({listType:"ul",maxLevels:3,handle:".menu-item-handle",placeholder:"sortable-placeholder",tolerance:"pointer",toleranceElement:"> dl",items:"li:not(.ui-state-disabled)",create:function(p,q){f(this).css("min-height",f(this).height())},start:function(p,q){q.placeholder.height(q.item.height())},stop:function(p,q){opts={url:ajaxurl,type:"POST",async:true,cache:false,dataType:"json",data:{action:"visual_form_builder_process_sort",order:f(this).nestedSortable("toArray")},success:function(r){f("#loading-animation").hide();return}};f.ajax(opts)}});f('#form-items input[type="submit"]').click(function(){f(this).closest("form").data("submit_value",f(this))});f(document).on("submit","#form-items",function(q){q.preventDefault();var r=f(this).serializeArray(),p=f(this).data("submit_value").attr("value");f("img.waiting").show();f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_create_field",data:r,field_type:p,page:pagenow,nonce:f("#_wpnonce").val()},success:function(s){f("img.waiting").hide();f(s).hide().insertBefore("#menu-to-edit li.ui-state-disabled:first").fadeIn();return},error:function(t,u,s){alert(t+" "+u+" "+s);return}})});f(document).on("click","a.item-delete",function(w){w.preventDefault();var u=childs=new Array(),A=0,q=f(this).attr("href"),p=q.split("&");for(var v=0;v<p.length;v++){var y=p[v].indexOf("=");var x=p[v].substring(0,y);var z=p[v].substring(y+1);u[x]=z}var r=f(this).closest(".form-item").find("ul").children();var s=r.parent().html();r.each(function(t){childs[t]=f(this).attr("id").match(new RegExp(/(\d+)$/g))[0]});var B=f(this).closest("li.form-item").parents("li.form-item");if(B.length){A=B.attr("id").match(new RegExp(/(\d+)$/g))[0]}f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_delete_field",form:u.form,field:u.field,child_ids:childs,parent_id:A,page:pagenow,nonce:u._wpnonce},success:function(t){f("#form_item_"+u.field).addClass("deleting").animate({opacity:0,height:0},350,function(){f(this).before(s).remove()});return},error:function(C,D,t){alert("There was an error loading the content");return}})});var n=f(".form-success-type:checked").val();f("#form-success-message-"+n).show();f(".form-success-type").change(function(){var p=f(this).val();if("text"==p){f("#form-success-message-text").show();f("#form-success-message-page, #form-success-message-redirect").hide()}else{if("page"==p){f("#form-success-message-page").show();f("#form-success-message-text, #form-success-message-redirect").hide()}else{if("redirect"==p){f("#form-success-message-redirect").show();f("#form-success-message-text, #form-success-message-page").hide()}}}});f(".vfb-field-types").click(function(q){q.preventDefault();f("#vfb-field-tabs li").removeClass("tabs");f(this).parent().addClass("tabs");f(".tabs-panel-active").removeClass("tabs-panel-active").addClass("tabs-panel-inactive");var p=this.hash;f(p).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")});f("#visual-form-builder-update").validate({rules:{"form_email_to[]":{email:true},form_email_from:{email:true},form_success_message_redirect:{url:true},form_notification_email_name:{required:function(p){return f("#form-notification-setting").is(":checked")}},form_notification_email_from:{required:function(p){return f("#form-notification-setting").is(":checked")},email:true},form_notification_email:{required:function(p){return f("#form-notification-setting").is(":checked")}}},errorPlacement:function(p,q){p.insertAfter(q.parent())}});f("#form_email_from_name_override").change(function(){if(f("#form_email_from_name_override").val()==""){f("#form-email-sender-name").attr("readonly",false)}else{f("#form-email-sender-name").attr("readonly","readonly")}});f("#form_email_from_override").change(function(){if(f("#form_email_from_override").val()==""){f("#form-email-sender").attr("readonly",false)}else{f("#form-email-sender").attr("readonly","readonly")}});if(f("#form-notification-setting").is(":checked")){f("#notification-email").show()}else{f("#notification-email").hide()}f("#form-notification-setting").change(function(){var p=f(this).is(":checked");if(p){f("#notification-email").show();f("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").attr("disabled",false)}else{f("#notification-email").hide();f("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").attr("disabled","disabled")}});f.validator.addMethod("multiemail",function(r,q){if(this.optional(q)){return true}var s=r.split(new RegExp("\\s*[,|;]\\s*","gi"));valid=true;for(var p in s){r=s[p];valid=valid&&jQuery.validator.methods.email.call(this,r,q)}return valid},"One or more email addresses are invalid")});jQuery.fn.extend({makeTabVisible:function(d,h,f,b,g){var j=this.eq(0),c,i,e={},a=0;if(!j.length){return this}c=j.offset().left;i=c+j.outerWidth();if(i>h){a=h-i}else{if(c<d){a=d-c}}if(!a){return this}e[b]="+="+1*a+"px";f.animate(e,Math.abs(a)*g,"linear");return this},isTabVisible:function(e,d){var b=this.eq(0),c=b.offset().left,a=c+b.outerWidth();return(a<=d&&c>=e)?true:false}});
1
+ jQuery(document).ready(function(g){var b=null;g(document).on("mouseenter mouseleave",".vfb-tooltip",function(t){if(t.type=="mouseenter"){if(b){clearTimeout(b);b=null}var q=g(this).attr("title"),s=g(this).attr("rel"),r=g(this).width();g(this).append('<div class="tooltip"><h3>'+q+'</h3><p class="text">'+s+"</p></div>");g.data(this,"title",q);this.title="";g(this).find(".tooltip").css({left:r+22});b=setTimeout(function(){g(".tooltip").fadeIn(300)},500)}else{this.title=g.data(this,"title");g(".tooltip").fadeOut(500);g(this).children().remove()}});g(document).on("click","a.addOption",function(w){w.preventDefault();var r=g(this).parent().parent().find(".clonedOption").length;var v=r+1;var x=g(this).closest("div").attr("id");var u=g(this).closest("div").children("label").attr("for");var q=u.replace(new RegExp(/(\d+)$/g),"");var t=x.replace(new RegExp(/(\d+)$/g),"");var s=g("#"+x).clone().attr("id",t+v);s.children("label").attr("for",q+v);s.find("input").attr("id",q+v);g("#"+t+r).after(s)});g(document).on("click","a.deleteOption",function(r){r.preventDefault();var q=g(this).parent().parent().find(".clonedOption").length;if(q-1==0){alert("You must have at least one option.")}else{g(this).closest("div").remove()}});g(document).on("click","a.addEmail",function(w){w.preventDefault();var r=g(this).closest("#email-details").find(".clonedOption").length;var v=r+1;var x=g(this).closest("div").attr("id");var u=g(this).closest("div").find("label").attr("for");var q=u.replace(new RegExp(/(\d+)$/g),"");var t=x.replace(new RegExp(/(\d+)$/g),"");var s=g("#"+x).clone().attr("id",t+v);s.find("label").attr("for",q+v);s.find("input").attr("id",q+v);g("#"+t+r).after(s)});g(document).on("click","a.deleteEmail",function(r){r.preventDefault();var q=g(this).closest("#email-details").find(".clonedOption").length;if(q-1==0){alert("You must have at least one option.")}else{g(this).closest("div").remove()}});g(".menu-delete, .entry-delete").click(function(){var q=(g(this).hasClass("entry-delete"))?"entry":"form";var r=confirm("You are about to permanently delete this "+q+" and all of its data.\n'Cancel' to stop, 'OK' to delete.");if(r){return true}return false});g(document).on("click","a.item-edit",function(q){q.preventDefault();g(q.target).closest("li").children(".menu-item-settings").slideToggle("fast");g(this).toggleClass("opened")});g("#form-copy-to-clipboard").focus(function(){this.select()});var f=g(".nav-tabs-wrapper"),j=f.children(".nav-tabs"),e=j.children(".nav-tab-active"),l=j.children(".nav-tab"),c=0,n,d,i={},k,a="margin-left",p="margin-right",m=2;l.each(function(){c+=g(this).outerWidth(true)});i.padding=0;i[p]=(-1*c)+"px";j.css(i);h();function h(){if(f.length){var s=f.width(),r=0,q={};d=f.offset().left;n=d+s;e.makeTabVisible(d,n,j,a,m);if(l.last().isTabVisible(d,n)){r=f.width()-c;r=r>0?0:r;q[a]=r+"px";j.animate(q,100,"linear")}if(s>c){g(".nav-tabs-arrow-right, .nav-tabs-arrow-left").hide()}else{g(".nav-tabs-arrow-right, .nav-tabs-arrow-left").show()}}}g(window).resize(function(){if(k){clearTimeout(k)}k=setTimeout(h,200)});g(".nav-tabs-arrow-right").mousedown(function(){var s=Math.abs(parseInt(j.css(a))),q=s,r={};q=Math.abs(c-f.width())-s;if(!q){return}r[a]="-="+q+"px";j.animate(r,q*m,"linear")}).mouseup(function(){j.stop(true)});g(".nav-tabs-arrow-left").mousedown(function(){var s=Math.abs(parseInt(j.css(a))),q=s,r={};if(!q){return}r[a]="+="+q+"px";j.animate(r,q*m,"linear")}).mouseup(function(){j.stop(true)});g("#menu-to-edit").nestedSortable({listType:"ul",maxLevels:3,handle:".menu-item-handle",placeholder:"sortable-placeholder",tolerance:"pointer",toleranceElement:"> dl",items:"li:not(.ui-state-disabled)",create:function(q,r){g(this).css("min-height",g(this).height())},start:function(q,r){r.placeholder.height(r.item.height())},stop:function(q,r){opts={url:ajaxurl,type:"POST",async:true,cache:false,dataType:"json",data:{action:"visual_form_builder_process_sort",order:g(this).nestedSortable("toArray")},success:function(s){g("#loading-animation").hide();return}};g.ajax(opts)}});g('#form-items input[type="submit"]').click(function(){g(this).closest("form").data("submit_value",g(this))});g(document).on("submit","#form-items",function(r){r.preventDefault();var s=g(this).serializeArray(),q=g(this).data("submit_value").attr("value");g("img.waiting").show();g.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_create_field",data:s,field_type:q,page:pagenow,nonce:g("#_wpnonce").val()},success:function(t){g("img.waiting").hide();g(t).hide().insertBefore("#menu-to-edit li.ui-state-disabled:first").fadeIn();return},error:function(u,v,t){alert(u+" "+v+" "+t);return}})});g(document).on("click","a.item-delete",function(x){x.preventDefault();var v=childs=new Array(),B=0,r=g(this).attr("href"),q=r.split("&");for(var w=0;w<q.length;w++){var z=q[w].indexOf("=");var y=q[w].substring(0,z);var A=q[w].substring(z+1);v[y]=A}var s=g(this).closest(".form-item").find("ul").children();var u=s.parent().html();s.each(function(t){childs[t]=g(this).attr("id").match(new RegExp(/(\d+)$/g))[0]});var C=g(this).closest("li.form-item").parents("li.form-item");if(C.length){B=C.attr("id").match(new RegExp(/(\d+)$/g))[0]}g.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_delete_field",form:v.form,field:v.field,child_ids:childs,parent_id:B,page:pagenow,nonce:v._wpnonce},success:function(t){g("#form_item_"+v.field).addClass("deleting").animate({opacity:0,height:0},350,function(){g(this).before(u).remove()});return},error:function(D,E,t){alert("There was an error loading the content");return}})});g("#form-settings-button").click(function(s){s.preventDefault();g(this).toggleClass("current");g("#form-settings").slideToggle();var q=g('input[name="form_id"]').val(),r=(g(this).hasClass("current"))?"opened":"closed";g.ajax({url:ajaxurl,type:"POST",async:true,cache:false,data:{action:"visual_form_builder_form_settings",form:q,status:r,page:pagenow},success:function(t){if(r=="closed"){g(".settings-links").removeClass("on");g(".settings-links:first").addClass("on");g(".form-details").slideUp("normal");g(".form-details:first").show("normal")}},error:function(u,v,t){alert("There was an error loading the content");return}})});g(".settings-links").click(function(s){s.preventDefault();g(".settings-links").removeClass("on");g(".form-details").slideUp("normal");if(g(this).next("div").is(":hidden")==true){g(this).addClass("on");g(this).next().slideDown("normal")}var r=g('input[name="form_id"]').val(),q=this.hash.replace(/#/g,"");g.ajax({url:ajaxurl,type:"POST",async:true,cache:false,data:{action:"visual_form_builder_form_settings",form:r,accordion:q,page:pagenow},success:function(t){},error:function(u,v,t){alert("There was an error loading the content");return}})});var o=g(".form-success-type:checked").val();g("#form-success-message-"+o).show();g(".form-success-type").change(function(){var q=g(this).val();if("text"==q){g("#form-success-message-text").show();g("#form-success-message-page, #form-success-message-redirect").hide()}else{if("page"==q){g("#form-success-message-page").show();g("#form-success-message-text, #form-success-message-redirect").hide()}else{if("redirect"==q){g("#form-success-message-redirect").show();g("#form-success-message-text, #form-success-message-page").hide()}}}});g(".vfb-field-types").click(function(r){r.preventDefault();g("#vfb-field-tabs li").removeClass("tabs");g(this).parent().addClass("tabs");g(".tabs-panel-active").removeClass("tabs-panel-active").addClass("tabs-panel-inactive");var q=this.hash;g(q).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")});g("#visual-form-builder-update").validate({rules:{"form_email_to[]":{email:true},form_email_from:{email:true},form_success_message_redirect:{url:true},form_notification_email_name:{required:function(q){return g("#form-notification-setting").is(":checked")}},form_notification_email_from:{required:function(q){return g("#form-notification-setting").is(":checked")},email:true},form_notification_email:{required:function(q){return g("#form-notification-setting").is(":checked")}}},errorPlacement:function(q,r){q.insertAfter(r.parent())}});g("#form_email_from_name_override").change(function(){if(g("#form_email_from_name_override").val()==""){g("#form-email-sender-name").attr("readonly",false)}else{g("#form-email-sender-name").attr("readonly","readonly")}});g("#form_email_from_override").change(function(){if(g("#form_email_from_override").val()==""){g("#form-email-sender").attr("readonly",false)}else{g("#form-email-sender").attr("readonly","readonly")}});if(g("#form-notification-setting").is(":checked")){g("#notification-email").show()}else{g("#notification-email").hide()}g("#form-notification-setting").change(function(){var q=g(this).is(":checked");if(q){g("#notification-email").show();g("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").attr("disabled",false)}else{g("#notification-email").hide();g("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").attr("disabled","disabled")}});g.validator.addMethod("multiemail",function(s,r){if(this.optional(r)){return true}var t=s.split(new RegExp("\\s*[,|;]\\s*","gi"));valid=true;for(var q in t){s=t[q];valid=valid&&jQuery.validator.methods.email.call(this,s,r)}return valid},"One or more email addresses are invalid")});jQuery.fn.extend({makeTabVisible:function(d,h,f,b,g){var j=this.eq(0),c,i,e={},a=0;if(!j.length){return this}c=j.offset().left;i=c+j.outerWidth();if(i>h){a=h-i}else{if(c<d){a=d-c}}if(!a){return this}e[b]="+="+1*a+"px";f.animate(e,Math.abs(a)*g,"linear");return this},isTabVisible:function(e,d){var b=this.eq(0),c=b.offset().left,a=c+b.outerWidth();return(a<=d&&c>=e)?true:false}});
languages/visual-form-builder-es_ES.mo ADDED
Binary file
languages/visual-form-builder-es_ES.po ADDED
@@ -0,0 +1,601 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Visual Form Builder 1.9.2\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-03-12 00:48+0100\n"
6
+ "PO-Revision-Date: 2012-03-12 01:41+0100\n"
7
+ "Last-Translator: Samuel Aguilera <correo@samuelaguilera.com>\n"
8
+ "Language-Team: Samuel Aguilera <correo@samuelaguilera.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: _;gettext;gettext_noop;__;_e;esc_html__\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-Language: Spanish\n"
15
+ "X-Poedit-Country: Spain\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+
18
+ #: class-entries-detail.php:38
19
+ #: class-entries-detail.php:92
20
+ msgid "Entry"
21
+ msgstr "Entrada"
22
+
23
+ #: class-entries-detail.php:43
24
+ msgid "Details"
25
+ msgstr "Detalles"
26
+
27
+ #: class-entries-detail.php:49
28
+ msgid "Form Title"
29
+ msgstr "Título formulario"
30
+
31
+ #: class-entries-detail.php:52
32
+ #: class-entries-list.php:98
33
+ #: class-entries-list.php:222
34
+ msgid "Date Submitted"
35
+ msgstr "Fecha envío"
36
+
37
+ #: class-entries-detail.php:55
38
+ #: class-entries-list.php:97
39
+ #: class-entries-list.php:226
40
+ msgid "IP Address"
41
+ msgstr "Dirección IP"
42
+
43
+ #: class-entries-detail.php:58
44
+ #: class-entries-list.php:93
45
+ #: class-entries-list.php:230
46
+ msgid "Email Subject"
47
+ msgstr "Asunto email"
48
+
49
+ #: class-entries-detail.php:61
50
+ #: class-entries-list.php:94
51
+ #: class-entries-list.php:234
52
+ #: visual-form-builder.php:1464
53
+ #: visual-form-builder.php:1564
54
+ msgid "Sender Name"
55
+ msgstr "Nombre remitente"
56
+
57
+ #: class-entries-detail.php:64
58
+ #: class-entries-list.php:95
59
+ #: class-entries-list.php:238
60
+ #: visual-form-builder.php:1569
61
+ msgid "Sender Email"
62
+ msgstr "Email remitente"
63
+
64
+ #: class-entries-detail.php:67
65
+ #: class-entries-list.php:96
66
+ #: class-entries-list.php:242
67
+ msgid "Emailed To"
68
+ msgstr "Enviado a"
69
+
70
+ #: class-entries-list.php:67
71
+ msgid "Cancel"
72
+ msgstr "Cancelar"
73
+
74
+ #: class-entries-list.php:92
75
+ #: class-entries-list.php:218
76
+ msgid "Form"
77
+ msgstr "Formulario"
78
+
79
+ #: class-entries-list.php:168
80
+ msgid "Delete"
81
+ msgstr "Borrar"
82
+
83
+ #: class-entries-list.php:169
84
+ msgid "Export All"
85
+ msgstr "Exportar todo"
86
+
87
+ #: class-entries-list.php:170
88
+ msgid "Export Selected"
89
+ msgstr "Exportar seleccionado"
90
+
91
+ #: class-entries-list.php:214
92
+ msgid "Entries ID"
93
+ msgstr "ID entradas"
94
+
95
+ #: class-entries-list.php:402
96
+ msgid "View all forms"
97
+ msgstr "Ver todos los formularios"
98
+
99
+ #: class-entries-list.php:409
100
+ msgid "Filter"
101
+ msgstr "Filtrar"
102
+
103
+ #: visual-form-builder.php:118
104
+ msgid "<div id=\"message\" class=\"updated\"><p>The form has been successfully created.</p></div>"
105
+ msgstr "<div id=\"message\" class=\"updated\"><p>El formulario ha sido creado correctamente.</p></div>"
106
+
107
+ #: visual-form-builder.php:121
108
+ #, php-format
109
+ msgid "<div id=\"message\" class=\"updated\"><p>The <strong>%s</strong> form has been updated.</p></div>"
110
+ msgstr "<div id=\"message\" class=\"updated\"><p>El formulario <strong>%s</strong> ha sido actualizado.</p></div>"
111
+
112
+ #: visual-form-builder.php:124
113
+ msgid "<div id=\"message\" class=\"updated\"><p>The form has been successfully deleted.</p></div>"
114
+ msgstr "<div id=\"message\" class=\"updated\"><p>El formulario borrado correctamente.</p></div>"
115
+
116
+ #: visual-form-builder.php:127
117
+ msgid "<div id=\"message\" class=\"updated\"><p>The form has been successfully duplicated.</p></div>"
118
+ msgstr "<div id=\"message\" class=\"updated\"><p>El formulario ha sido duplicado correctamente.</p></div>"
119
+
120
+ #: visual-form-builder.php:416
121
+ msgid "Settings"
122
+ msgstr "Ajustes"
123
+
124
+ #: visual-form-builder.php:429
125
+ #: visual-form-builder.php:1277
126
+ msgid "Visual Form Builder"
127
+ msgstr "Visual Form Builder"
128
+
129
+ #: visual-form-builder.php:459
130
+ #, php-format
131
+ msgid "<div id=\"message\" class=\"updated\"><p>The <strong>%s</strong> form has been created.</p></div>"
132
+ msgstr "<div id=\"message\" class=\"updated\"><p>El formulario <strong>%s</strong> ha sido creado.</p></div>"
133
+
134
+ #: visual-form-builder.php:1000
135
+ msgid "Edit Field Item"
136
+ msgstr "Editar elementos del campo"
137
+
138
+ #: visual-form-builder.php:1015
139
+ #: visual-form-builder.php:1035
140
+ #: visual-form-builder.php:1212
141
+ msgid "CSS Classes"
142
+ msgstr "Clases CSS"
143
+
144
+ #: visual-form-builder.php:1024
145
+ #: visual-form-builder.php:1045
146
+ msgid "Name"
147
+ msgstr "Nombre"
148
+
149
+ #: visual-form-builder.php:1053
150
+ msgid "Description"
151
+ msgstr "Descripción"
152
+
153
+ #: visual-form-builder.php:1063
154
+ msgid "Options"
155
+ msgstr "Opciones"
156
+
157
+ #: visual-form-builder.php:1117
158
+ msgid "Accepted File Extensions"
159
+ msgstr "Extensiones aceptadas"
160
+
161
+ #: visual-form-builder.php:1130
162
+ msgid "Validation"
163
+ msgstr "Validación"
164
+
165
+ #: visual-form-builder.php:1133
166
+ msgid "12 Hour Format"
167
+ msgstr "Formato 12 horas"
168
+
169
+ #: visual-form-builder.php:1134
170
+ msgid "24 Hour Format"
171
+ msgstr "Formato 24 horas"
172
+
173
+ #: visual-form-builder.php:1136
174
+ msgid "None"
175
+ msgstr "Ninguno"
176
+
177
+ #: visual-form-builder.php:1137
178
+ msgid "Email"
179
+ msgstr "Email"
180
+
181
+ #: visual-form-builder.php:1138
182
+ msgid "URL"
183
+ msgstr "URL"
184
+
185
+ #: visual-form-builder.php:1139
186
+ msgid "Date"
187
+ msgstr "Fecha"
188
+
189
+ #: visual-form-builder.php:1140
190
+ msgid "Number"
191
+ msgstr "Número"
192
+
193
+ #: visual-form-builder.php:1141
194
+ msgid "Digits"
195
+ msgstr "Dígitos"
196
+
197
+ #: visual-form-builder.php:1142
198
+ msgid "Phone"
199
+ msgstr "Teléfono"
200
+
201
+ #: visual-form-builder.php:1151
202
+ msgid "Required"
203
+ msgstr "Obligatorio"
204
+
205
+ #: visual-form-builder.php:1153
206
+ msgid "No"
207
+ msgstr "No"
208
+
209
+ #: visual-form-builder.php:1154
210
+ msgid "Yes"
211
+ msgstr "Sí"
212
+
213
+ #: visual-form-builder.php:1163
214
+ msgid "Size"
215
+ msgstr "Tamaño"
216
+
217
+ #: visual-form-builder.php:1165
218
+ msgid "Small"
219
+ msgstr "Pequeño"
220
+
221
+ #: visual-form-builder.php:1166
222
+ msgid "Medium"
223
+ msgstr "Medio"
224
+
225
+ #: visual-form-builder.php:1167
226
+ msgid "Large"
227
+ msgstr "Grande"
228
+
229
+ #: visual-form-builder.php:1176
230
+ msgid "Options Layout"
231
+ msgstr "Formato opciones"
232
+
233
+ #: visual-form-builder.php:1178
234
+ msgid "One Column"
235
+ msgstr "Una columna"
236
+
237
+ #: visual-form-builder.php:1179
238
+ msgid "Two Columns"
239
+ msgstr "Dos columnas"
240
+
241
+ #: visual-form-builder.php:1180
242
+ msgid "Three Columns"
243
+ msgstr "Tres columnas"
244
+
245
+ #: visual-form-builder.php:1181
246
+ msgid "Auto Width"
247
+ msgstr "Ancho automático"
248
+
249
+ #: visual-form-builder.php:1190
250
+ msgid "Field Layout"
251
+ msgstr "Ubicación campo"
252
+
253
+ #: visual-form-builder.php:1193
254
+ msgid "Default"
255
+ msgstr "Predeterminada"
256
+
257
+ #: visual-form-builder.php:1195
258
+ msgid "Left Half"
259
+ msgstr "Mitad izquierda"
260
+
261
+ #: visual-form-builder.php:1196
262
+ msgid "Right Half"
263
+ msgstr "Mitad derecha"
264
+
265
+ #: visual-form-builder.php:1199
266
+ msgid "Left Third"
267
+ msgstr "Un tercio izquierda"
268
+
269
+ #: visual-form-builder.php:1200
270
+ msgid "Middle Third"
271
+ msgstr "Un tercio centro"
272
+
273
+ #: visual-form-builder.php:1201
274
+ msgid "Right Third"
275
+ msgstr "Un tercio derecha"
276
+
277
+ #: visual-form-builder.php:1204
278
+ msgid "Left Two Thirds"
279
+ msgstr "Dos tercios izquierda"
280
+
281
+ #: visual-form-builder.php:1205
282
+ msgid "Right Two Thirds"
283
+ msgstr "Dos tercios derecha"
284
+
285
+ #: visual-form-builder.php:1222
286
+ msgid "Remove"
287
+ msgstr "Eliminar"
288
+
289
+ #: visual-form-builder.php:1279
290
+ msgid "Forms"
291
+ msgstr "Formularios"
292
+
293
+ #: visual-form-builder.php:1280
294
+ msgid "Entries"
295
+ msgstr "Entradas"
296
+
297
+ #: visual-form-builder.php:1319
298
+ msgid "Form Items"
299
+ msgstr "Elementos del formulario"
300
+
301
+ #: visual-form-builder.php:1322
302
+ msgid "Click"
303
+ msgstr "Haz clic"
304
+
305
+ #: visual-form-builder.php:1322
306
+ msgid "to Add a Field"
307
+ msgstr "para añadir un campo"
308
+
309
+ #: visual-form-builder.php:1348
310
+ msgid "Form Output"
311
+ msgstr "Salida del formulario"
312
+
313
+ #: visual-form-builder.php:1351
314
+ msgid "Copy this shortcode and paste into any Post or Page."
315
+ msgstr "Copia este código y pégalo en cualquier entrada o página."
316
+
317
+ #: visual-form-builder.php:1414
318
+ #: visual-form-builder.php:1416
319
+ msgid "Add form"
320
+ msgstr "Añadir formulario"
321
+
322
+ #: visual-form-builder.php:1432
323
+ msgid "Form Name"
324
+ msgstr "Nombre formulario"
325
+
326
+ #: visual-form-builder.php:1437
327
+ msgid "Duplicate Form"
328
+ msgstr "Duplicar formulario"
329
+
330
+ #: visual-form-builder.php:1447
331
+ msgid "Customize Email Details"
332
+ msgstr "Personalizar detalles del email"
333
+
334
+ #: visual-form-builder.php:1447
335
+ msgid "Email Details"
336
+ msgstr "Detalles del email"
337
+
338
+ #: visual-form-builder.php:1448
339
+ msgid "Customize Confirmation Message"
340
+ msgstr "Personalizar mensaje de confirmación"
341
+
342
+ #: visual-form-builder.php:1448
343
+ msgid "Confirmation"
344
+ msgstr "Confirmación"
345
+
346
+ #: visual-form-builder.php:1449
347
+ msgid "Customize Notification Email"
348
+ msgstr "Personalizar email de notificación"
349
+
350
+ #: visual-form-builder.php:1449
351
+ msgid "Notification"
352
+ msgstr "Notificación"
353
+
354
+ #: visual-form-builder.php:1453
355
+ msgid "The forms you build here will send information to one or more email addresses when submitted by a user on your site. Use the fields below to customize the details of that email."
356
+ msgstr "Los formularios creados aquí enviarán información a una o más direcciones de email cuando un usuario de tu sitio los envíe. Usa los campos a continuación para personalizar los detalles de ese email."
357
+
358
+ #: visual-form-builder.php:1457
359
+ msgid "E-mail Subject"
360
+ msgstr "Asunto email"
361
+
362
+ #: visual-form-builder.php:1469
363
+ msgid "Select a required text field"
364
+ msgstr "Selecciona un campo de texto obligatorio"
365
+
366
+ #: visual-form-builder.php:1480
367
+ msgid "Sender E-mail"
368
+ msgstr "Email remitente"
369
+
370
+ #: visual-form-builder.php:1483
371
+ msgid "OR"
372
+ msgstr "O"
373
+
374
+ #: visual-form-builder.php:1485
375
+ #: visual-form-builder.php:1577
376
+ msgid "Select a required text field with email validation"
377
+ msgstr "Selecciona un campo obligatorio con validación de email"
378
+
379
+ #: visual-form-builder.php:1504
380
+ msgid "E-mail(s) To"
381
+ msgstr "Se envía a"
382
+
383
+ #: visual-form-builder.php:1520
384
+ msgid "After someone submits a form, you can control what is displayed. By default, it's a message but you can send them to another WordPress Page or a custom URL."
385
+ msgstr "Cuando alguien envía un formulario, puedes controlar qué se mostrará. De manera predeterminada es un mensaje, pero puedes enviarlos a otra página de WordPress o una URL personalizada."
386
+
387
+ #: visual-form-builder.php:1523
388
+ msgid "Text"
389
+ msgstr "Texto"
390
+
391
+ #: visual-form-builder.php:1527
392
+ msgid "Page"
393
+ msgstr "Página"
394
+
395
+ #: visual-form-builder.php:1531
396
+ msgid "Redirect"
397
+ msgstr "Redireccionar"
398
+
399
+ #: visual-form-builder.php:1538
400
+ msgid "Your form was successfully submitted. Thank you for contacting us."
401
+ msgstr "El formulario ha sido enviado correctamente. Gracias por contactar con nosotros."
402
+
403
+ #: visual-form-builder.php:1547
404
+ msgid "Select a Page"
405
+ msgstr "Selecciona una página"
406
+
407
+ #: visual-form-builder.php:1556
408
+ msgid "When a user submits their entry, you can send a customizable notification email."
409
+ msgstr "Cuando un usuario hace un envío, puedes enviar una notificación por email personalizable."
410
+
411
+ #: visual-form-builder.php:1559
412
+ msgid "Send Confirmation Email to User"
413
+ msgstr "Enviar email de confirmación al usuario"
414
+
415
+ #: visual-form-builder.php:1574
416
+ msgid "Send To"
417
+ msgstr "Enviar a"
418
+
419
+ #: visual-form-builder.php:1586
420
+ msgid "Subject"
421
+ msgstr "Asunto"
422
+
423
+ #: visual-form-builder.php:1590
424
+ msgid "Message"
425
+ msgstr "Mensaje"
426
+
427
+ #: visual-form-builder.php:1596
428
+ msgid "Include a Copy of the User's Entry"
429
+ msgstr "Incluir una copia del envío del usuario"
430
+
431
+ #: visual-form-builder.php:1603
432
+ #: visual-form-builder.php:1686
433
+ msgid "Create Form"
434
+ msgstr "Crear formulario"
435
+
436
+ #: visual-form-builder.php:1603
437
+ #: visual-form-builder.php:1686
438
+ msgid "Save Form"
439
+ msgstr "Guardar formulario"
440
+
441
+ #: visual-form-builder.php:1607
442
+ msgid "Delete Form"
443
+ msgstr "Borrar formulario"
444
+
445
+ #: visual-form-builder.php:1617
446
+ msgid "Getting Started"
447
+ msgstr "Comenzando"
448
+
449
+ #: visual-form-builder.php:1619
450
+ msgid "Enter a name in the Form Name input above and click Create Form."
451
+ msgstr "Introduce un nombre en la casilla de \"nombre formulario\" y haz clic en crear formulario."
452
+
453
+ #: visual-form-builder.php:1620
454
+ msgid "Click form items from the Form Item box on the left to add to your form."
455
+ msgstr "Haz clic en elementos del formulario de la caja de elementos del formulario a la izquierda para añadirlos a tu formulario."
456
+
457
+ #: visual-form-builder.php:1621
458
+ msgid "After adding an item, drag and drop to put them in the order you want."
459
+ msgstr "Después de añadir un elemento, arrastra y suelta para ponerlo en el orden que quieras."
460
+
461
+ #: visual-form-builder.php:1622
462
+ msgid "Click the down arrow on each item to reveal configuration options."
463
+ msgstr "Haz clic en la fecha hacia abajo de cada elemento para visualizar opciones de configuración."
464
+
465
+ #: visual-form-builder.php:1623
466
+ msgid "Configure the Email Details section."
467
+ msgstr "Configurar sección detalles del email."
468
+
469
+ #: visual-form-builder.php:1624
470
+ msgid "When you have finished building your form, click the Save Form button."
471
+ msgstr "Cuando hayas terminado de construir tu formulario, haz clic en el botón guardar formulario."
472
+
473
+ #: visual-form-builder.php:1627
474
+ msgid "Need more help?"
475
+ msgstr "¿Necesitas más ayuda?"
476
+
477
+ #: visual-form-builder.php:1629
478
+ msgid "Click on the Help tab at the top of this page."
479
+ msgstr "Haz clic en la pestaña de ayuda en la parte superior de esta página."
480
+
481
+ #: visual-form-builder.php:1634
482
+ msgid "Help Promote Visual Form Builder"
483
+ msgstr "Ayuda a promocionar Visual Form Builder"
484
+
485
+ #: visual-form-builder.php:1636
486
+ msgid "Follow me on Twitter"
487
+ msgstr "Sígueme en Twitter"
488
+
489
+ #: visual-form-builder.php:1637
490
+ msgid "Rate Visual Form Builder on WordPress.org"
491
+ msgstr "Califica Visual Form Builder en WordPress.org"
492
+
493
+ #: visual-form-builder.php:1646
494
+ msgid "New Features of Visual Form Builder Pro"
495
+ msgstr "Nuevas características de Visual Form Builder Pro"
496
+
497
+ #: visual-form-builder.php:1648
498
+ msgid "10 new Form Fields (Username, Password, Color Picker, Autocomplete, and more)"
499
+ msgstr "10 nuevos campos de formulario (usuario, contraseña, selector de color, autocompletar, y más)"
500
+
501
+ #: visual-form-builder.php:1649
502
+ msgid "Edit and Update Entries"
503
+ msgstr "Editar y actualizar entradas"
504
+
505
+ #: visual-form-builder.php:1650
506
+ msgid "Quality HTML Email Template"
507
+ msgstr "Plantilla de email HTML de calidad"
508
+
509
+ #: visual-form-builder.php:1651
510
+ msgid "Email Designer"
511
+ msgstr "Diseñador email"
512
+
513
+ #: visual-form-builder.php:1652
514
+ msgid "Analytics"
515
+ msgstr "Estadísticas"
516
+
517
+ #: visual-form-builder.php:1653
518
+ msgid "Data &amp; Form Migration"
519
+ msgstr "Migración de datos y formularios"
520
+
521
+ #: visual-form-builder.php:1654
522
+ msgid "PayPal Integration"
523
+ msgstr "Integración con Paypal"
524
+
525
+ #: visual-form-builder.php:1655
526
+ msgid "Form Paging"
527
+ msgstr "Paginación formulario"
528
+
529
+ #: visual-form-builder.php:1656
530
+ msgid "No License Key"
531
+ msgstr "Sin llave de licencia"
532
+
533
+ #: visual-form-builder.php:1657
534
+ msgid "Unlimited Use"
535
+ msgstr "Uso ilimitado"
536
+
537
+ #: visual-form-builder.php:1658
538
+ msgid "Automatic Updates"
539
+ msgstr "Actualizaciones automáticas"
540
+
541
+ #: visual-form-builder.php:1661
542
+ msgid "Learn more about some of these features"
543
+ msgstr "Conoce más acerca de estas características"
544
+
545
+ #: visual-form-builder.php:1662
546
+ msgid "Buy Now"
547
+ msgstr "Comprar ahora"
548
+
549
+ #: visual-form-builder.php:1662
550
+ msgid "Only $10"
551
+ msgstr "Sólo $10"
552
+
553
+ #: visual-form-builder.php:1668
554
+ msgid "Select form inputs from the box at left to begin building your custom form. An initial fieldset has been automatically added to get you started."
555
+ msgstr "Selecciona campos de entrada de la caja de la izquierda para comenzar a construir tu formulario. Se ha añadido automáticamente un conjuto de campos para que empieces."
556
+
557
+ #: visual-form-builder.php:1848
558
+ #, php-format
559
+ msgid "Logged in as <a href=\"%1$s\">%2$s</a>. Verification not required."
560
+ msgstr "Conectado como <a href=\"%1$s\">%2$s</a>. Verificación no necesaria."
561
+
562
+ #: visual-form-builder.php:2083
563
+ msgid "Verification"
564
+ msgstr "Verificación"
565
+
566
+ #: visual-form-builder.php:2087
567
+ msgid "Please enter any two digits with"
568
+ msgstr "Por favor introduce dos números"
569
+
570
+ #: visual-form-builder.php:2087
571
+ msgid "no"
572
+ msgstr "sin"
573
+
574
+ #: visual-form-builder.php:2087
575
+ msgid "spaces (Example: 12)"
576
+ msgstr "espacios (Por ejemplo: 23)"
577
+
578
+ #: visual-form-builder.php:2096
579
+ msgid "This box is for spam protection"
580
+ msgstr "Esta casilla es para protección antispam"
581
+
582
+ #: visual-form-builder.php:2096
583
+ msgid "please leave it blank"
584
+ msgstr "por favor déjalo en blanco"
585
+
586
+ #: visual-form-builder.php:2130
587
+ msgid "Security check"
588
+ msgstr "Comprobación de seguridad"
589
+
590
+ #: visual-form-builder.php:2383
591
+ msgid "Ooops! Looks like you have failed the security validation for this form. Please go back and try again."
592
+ msgstr "¡Vaya! Parece que has fallado la validación de seguridad de este formulario. Por favor vuelve atrás e inténtalo de nuevo."
593
+
594
+ #~ msgid "(multiple emails separated by commas)"
595
+ #~ msgstr "(múltiples emails separados por comas)"
596
+
597
+ #~ msgid "Options (separated by commas)"
598
+ #~ msgstr "Opciones (separadas por comas)"
599
+
600
+ #~ msgid "Submit"
601
+ #~ msgstr "Enviar"
readme.txt CHANGED
@@ -4,9 +4,9 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=G87A9
4
  Tags: form, forms, contact form, form to email, email form, email, input, validation, jquery, shortcode
5
  Requires at least: 3.3
6
  Tested up to: 3.3.1
7
- Stable tag: 2.1
8
 
9
- Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
10
 
11
  == Description ==
12
 
@@ -164,9 +164,23 @@ To Export Selected:
164
  1. Visual Form Builder page
165
  2. Configuring field item options
166
  3. Entries management screen
 
167
 
168
  == Changelog ==
169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  **Version 2.1**
171
 
172
  * Add Accepts option to File Upload field
@@ -283,6 +297,9 @@ To Export Selected:
283
 
284
  == Upgrade Notice ==
285
 
 
 
 
286
  = 2.1 =
287
  Please note this version requires WordPress 3.3. Please update your WordPress install before upgrading to Visual Form Builder 2.1.
288
 
4
  Tags: form, forms, contact form, form to email, email form, email, input, validation, jquery, shortcode
5
  Requires at least: 3.3
6
  Tested up to: 3.3.1
7
+ Stable tag: 2.2
8
 
9
+ Build contact forms using a simple, clean interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
10
 
11
  == Description ==
12
 
164
  1. Visual Form Builder page
165
  2. Configuring field item options
166
  3. Entries management screen
167
+ 4. Rendered form on a page
168
 
169
  == Changelog ==
170
 
171
+ **Version 2.2**
172
+
173
+ * Add Label Alignment option
174
+ * Add server side form validation; SPAM hardening
175
+ * Add inline Field help tooltip popups
176
+ * Add Spanish translation
177
+ * Update Form Settings UI
178
+ * Update File Upload field to place attachments in Media Library
179
+ * Update Field Description to allow HTML tags
180
+ * Update Field Name and CSS Classes to enforce a maxlength of 255 characters
181
+ * Update jQueryUI version
182
+ * Fix bug preventing form deletion
183
+
184
  **Version 2.1**
185
 
186
  * Add Accepts option to File Upload field
297
 
298
  == Upgrade Notice ==
299
 
300
+ = 2.2 =
301
+ Updated Form Settings UI. Additional SPAM hardening, new inline help tooltips, file uploads now added to Media Library, and a lot more!
302
+
303
  = 2.1 =
304
  Please note this version requires WordPress 3.3. Please update your WordPress install before upgrading to Visual Form Builder 2.1.
305
 
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-4.png ADDED
Binary file
uninstall.php CHANGED
@@ -14,4 +14,6 @@
14
 
15
  delete_option( 'vfb_db_version' );
16
  delete_option( 'visual-form-builder-screen-options' );
 
 
17
  ?>
14
 
15
  delete_option( 'vfb_db_version' );
16
  delete_option( 'visual-form-builder-screen-options' );
17
+
18
+ $wpdb->query( $wpdb->prepare( "DELETE FROM " . $wpdb->prefix . "usermeta WHERE meta_key IN ( 'vfb-form-settings' )" ) );
19
  ?>
visual-form-builder.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Visual Form Builder
4
  Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
5
  Author: Matthew Muro
6
  Author URI: http://matthewmuro.com
7
- Version: 2.1
8
  */
9
 
10
  /*
@@ -28,7 +28,7 @@ $visual_form_builder = new Visual_Form_Builder();
28
  /* Restrict Categories class */
29
  class Visual_Form_Builder{
30
 
31
- protected $vfb_db_version = '2.1';
32
 
33
  public function __construct(){
34
  global $wpdb;
@@ -47,12 +47,10 @@ class Visual_Form_Builder{
47
  add_action( 'wp_ajax_visual_form_builder_process_sort', array( &$this, 'process_sort_callback' ) );
48
  add_action( 'wp_ajax_visual_form_builder_create_field', array( &$this, 'create_field_callback' ) );
49
  add_action( 'wp_ajax_visual_form_builder_delete_field', array( &$this, 'delete_field_callback' ) );
 
50
 
51
  add_action( 'load-settings_page_visual-form-builder', array( &$this, 'add_contextual_help' ) );
52
  add_action( 'admin_init', array( &$this, 'export_entries' ) );
53
-
54
- /* Load i18n */
55
- load_plugin_textdomain( 'visual-form-builder', false , basename( dirname( __FILE__ ) ) . '/languages' );
56
 
57
  /* Load the includes files */
58
  add_action( 'plugins_loaded', array( &$this, 'includes' ) );
@@ -84,6 +82,9 @@ class Visual_Form_Builder{
84
  add_action('admin_notices', array( &$this, 'admin_notices' ) );
85
  }
86
 
 
 
 
87
  add_shortcode( 'vfb', array( &$this, 'form_code' ) );
88
  add_action( 'init', array( &$this, 'email' ), 10 );
89
  add_action( 'init', array( &$this, 'confirmation' ), 12 );
@@ -338,6 +339,7 @@ class Visual_Form_Builder{
338
  form_notification_subject VARCHAR(255),
339
  form_notification_message TEXT,
340
  form_notification_entry VARCHAR(25),
 
341
  UNIQUE KEY (form_id)
342
  ) DEFAULT CHARACTER SET $charset COLLATE $collate;";
343
 
@@ -542,6 +544,7 @@ class Visual_Form_Builder{
542
  $form_notification_subject = esc_html( $_REQUEST['form_notification_subject'] );
543
  $form_notification_message = wp_richedit_pre( $_REQUEST['form_notification_message'] );
544
  $form_notification_entry = esc_html( $_REQUEST['form_notification_entry'] );
 
545
 
546
  /* Add confirmation based on which type was selected */
547
  switch ( $form_success_type ) {
@@ -575,7 +578,8 @@ class Visual_Form_Builder{
575
  'form_notification_email' => $form_notification_email,
576
  'form_notification_subject' => $form_notification_subject,
577
  'form_notification_message' => $form_notification_message,
578
- 'form_notification_entry' => $form_notification_entry
 
579
  );
580
 
581
  $where = array(
@@ -752,7 +756,8 @@ class Visual_Form_Builder{
752
  'form_notification_email' => $form->form_notification_email,
753
  'form_notification_subject' => $form->form_notification_subject,
754
  'form_notification_message' => $form->form_notification_message,
755
- 'form_notification_entry' => $form->form_notification_entry
 
756
  );
757
 
758
  $wpdb->insert( $this->form_table_name, $data );
@@ -782,7 +787,7 @@ class Visual_Form_Builder{
782
  $wpdb->insert( $this->field_table_name, $data );
783
 
784
  /* If a parent field, save the old ID and the new ID to update new parent ID */
785
- if ( in_array( $field->field_type, array( 'fieldset', 'section' ) ) )
786
  $parents[ $field->field_id ] = $wpdb->insert_id;
787
 
788
  if ( $override == $field->field_id )
@@ -940,6 +945,44 @@ class Visual_Form_Builder{
940
 
941
  die(1);
942
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
943
 
944
  /**
945
  * Build field output in admin
@@ -1006,13 +1049,17 @@ class Visual_Form_Builder{
1006
  <?php if ( in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ) ) ) : ?>
1007
 
1008
  <p class="description description-wide">
1009
- <label for="edit-form-item-name-<?php echo $field->field_id; ?>"><?php echo ( in_array( $field->field_type, array( 'fieldset', 'verification' ) ) ) ? 'Legend' : 'Name'; ?><br />
1010
- <input type="text" value="<?php echo stripslashes( $field->field_name ); ?>" name="field_name-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-name-<?php echo $field->field_id; ?>" />
 
 
1011
  </label>
1012
  </p>
1013
  <p class="description description-wide">
1014
  <label for="edit-form-item-css-<?php echo $field->field_id; ?>">
1015
- <?php _e( 'CSS Classes' , 'visual-form-builder'); ?><br />
 
 
1016
  <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_css ) ); ?>" name="field_css-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-css-<?php echo $field->field_id; ?>" />
1017
  </label>
1018
  </p>
@@ -1021,19 +1068,26 @@ class Visual_Form_Builder{
1021
  <!-- Instructions -->
1022
  <p class="description description-wide">
1023
  <label for="edit-form-item-name-<?php echo $field->field_id; ?>">
1024
- <?php _e( 'Name' , 'visual-form-builder'); ?><br />
1025
- <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_name ) ); ?>" name="field_name-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-name-<?php echo $field->field_id; ?>" />
 
 
1026
  </label>
1027
  </p>
1028
  <p class="description description-wide">
1029
- <label for="edit-form-item-description-<?php echo $field->field_id; ?>">Description (HTML tags allowed)<br />
 
 
 
1030
  <textarea name="field_description-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-description-<?php echo $field->field_id; ?>" /><?php echo stripslashes( $field->field_description ); ?></textarea>
1031
  </label>
1032
  </p>
1033
  <p class="description description-wide">
1034
  <label for="edit-form-item-css-<?php echo $field->field_id; ?>">
1035
- <?php _e( 'CSS Classes' , 'visual-form-builder'); ?><br />
1036
- <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_css ) ); ?>" name="field_css-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-css-<?php echo $field->field_id; ?>" />
 
 
1037
  </label>
1038
  </p>
1039
 
@@ -1042,15 +1096,19 @@ class Visual_Form_Builder{
1042
  <!-- Name -->
1043
  <p class="description description-wide">
1044
  <label for="edit-form-item-name-<?php echo $field->field_id; ?>">
1045
- <?php _e( 'Name' , 'visual-form-builder'); ?><br />
1046
- <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_name ) ); ?>" name="field_name-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-name-<?php echo $field->field_id; ?>" />
 
 
1047
  </label>
1048
  </p>
1049
  <?php if ( $field->field_type !== 'submit' ) : ?>
1050
  <!-- Description -->
1051
  <p class="description description-wide">
1052
  <label for="edit-form-item-description-<?php echo $field->field_id; ?>">
1053
- <?php _e( 'Description' , 'visual-form-builder'); ?><br />
 
 
1054
  <input type="text" value="<?php echo stripslashes( $field->field_description ); ?>" name="field_description-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-description-<?php echo $field->field_id; ?>" />
1055
  </label>
1056
  </p>
@@ -1061,6 +1119,8 @@ class Visual_Form_Builder{
1061
  <!-- Options -->
1062
  <p class="description description-wide">
1063
  <?php _e( 'Options' , 'visual-form-builder'); ?>
 
 
1064
  <?php
1065
  /* If the options field isn't empty, unserialize and build array */
1066
  if ( !empty( $field->field_options ) ) {
@@ -1115,6 +1175,8 @@ class Visual_Form_Builder{
1115
  ?>
1116
  <label for="edit-form-item-options-<?php echo $field->field_id; ?>">
1117
  <?php _e( 'Accepted File Extensions' , 'visual-form-builder'); ?>
 
 
1118
  <input type="text" value="<?php echo stripslashes( $options ); ?>" name="field_options-<?php echo $field->field_id; ?>[]" class="widefat" id="edit-form-item-options-<?php echo $field->field_id; ?>" />
1119
  </label>
1120
  </p>
@@ -1127,7 +1189,9 @@ class Visual_Form_Builder{
1127
  <!-- Validation -->
1128
  <p class="description description-thin">
1129
  <label for="edit-form-item-validation">
1130
- <?php _e( 'Validation' , 'visual-form-builder'); ?><br />
 
 
1131
  <select name="field_validation-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-validation-<?php echo $field->field_id; ?>"<?php echo ( in_array( $field->field_type, array( 'radio', 'select', 'checkbox', 'address', 'date', 'textarea', 'html', 'file-upload', 'secret' ) ) ) ? ' disabled="disabled"' : ''; ?>>
1132
  <?php if ( $field->field_type == 'time' ) : ?>
1133
  <option value="time-12" <?php selected( $field->field_validation, 'time-12' ); ?>><?php _e( '12 Hour Format' , 'visual-form-builder'); ?></option>
@@ -1148,7 +1212,9 @@ class Visual_Form_Builder{
1148
  <!-- Required -->
1149
  <p class="field-link-target description description-thin">
1150
  <label for="edit-form-item-required">
1151
- <?php _e( 'Required' , 'visual-form-builder'); ?><br />
 
 
1152
  <select name="field_required-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-required-<?php echo $field->field_id; ?>">
1153
  <option value="no" <?php selected( $field->field_required, 'no' ); ?>><?php _e( 'No' , 'visual-form-builder'); ?></option>
1154
  <option value="yes" <?php selected( $field->field_required, 'yes' ); ?>><?php _e( 'Yes' , 'visual-form-builder'); ?></option>
@@ -1160,7 +1226,9 @@ class Visual_Form_Builder{
1160
  <!-- Size -->
1161
  <p class="description description-thin">
1162
  <label for="edit-form-item-size">
1163
- <?php _e( 'Size' , 'visual-form-builder'); ?><br />
 
 
1164
  <select name="field_size-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-size-<?php echo $field->field_id; ?>">
1165
  <option value="small" <?php selected( $field->field_size, 'small' ); ?>><?php _e( 'Small' , 'visual-form-builder'); ?></option>
1166
  <option value="medium" <?php selected( $field->field_size, 'medium' ); ?>><?php _e( 'Medium' , 'visual-form-builder'); ?></option>
@@ -1173,7 +1241,9 @@ class Visual_Form_Builder{
1173
  <!-- Options Layout -->
1174
  <p class="description description-thin">
1175
  <label for="edit-form-item-size">
1176
- <?php _e( 'Options Layout' , 'visual-form-builder'); ?><br />
 
 
1177
  <select name="field_size-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-size-<?php echo $field->field_id; ?>"<?php echo ( $field->field_type == 'time' ) ? ' disabled="disabled"' : ''; ?>>
1178
  <option value="" <?php selected( $field->field_size, '' ); ?>><?php _e( 'One Column' , 'visual-form-builder'); ?></option>
1179
  <option value="two-column" <?php selected( $field->field_size, 'two-column' ); ?>><?php _e( 'Two Columns' , 'visual-form-builder'); ?></option>
@@ -1187,7 +1257,9 @@ class Visual_Form_Builder{
1187
  <!-- Field Layout -->
1188
  <p class="description description-thin">
1189
  <label for="edit-form-item-layout">
1190
- <?php _e( 'Field Layout' , 'visual-form-builder'); ?><br />
 
 
1191
  <select name="field_layout-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-layout-<?php echo $field->field_id; ?>">
1192
 
1193
  <option value="" <?php selected( $field->field_layout, '' ); ?>><?php _e( 'Default' , 'visual-form-builder'); ?></option>
@@ -1209,8 +1281,10 @@ class Visual_Form_Builder{
1209
  </p>
1210
  <p class="description description-wide">
1211
  <label for="edit-form-item-css-<?php echo $field->field_id; ?>">
1212
- <?php _e( 'CSS Classes' , 'visual-form-builder'); ?><br />
1213
- <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_css ) ); ?>" name="field_css-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-css-<?php echo $field->field_id; ?>" />
 
 
1214
  </label>
1215
  </p>
1216
 
@@ -1432,181 +1506,276 @@ class Visual_Form_Builder{
1432
  <span class="sender-labels"><?php _e( 'Form Name' , 'visual-form-builder'); ?></span>
1433
  <input type="text" value="<?php echo ( isset( $form_title ) ) ? $form_title : ''; ?>" title="Enter form name here" class="menu-name regular-text menu-item-textbox" id="form-name" name="form_title" />
1434
  </label>
1435
- <?php if ( !empty( $form_nav_selected_id ) ) : ?>
1436
- <div class="delete-action">
1437
- <a class="" href="<?php echo esc_url( wp_nonce_url( admin_url('options-general.php?page=visual-form-builder&amp;action=copy_form&amp;form=' . $form_nav_selected_id ), 'copy-form-' . $form_nav_selected_id ) ); ?>"><?php _e( 'Duplicate Form' , 'visual-form-builder'); ?></a>
1438
- </div>
1439
- <?php endif; ?>
1440
  <?php
1441
  /* Display sender details and confirmation message if we're on a form, otherwise just the form name */
1442
  if ( $form_nav_selected_id !== '0' ) :
1443
  ?>
1444
  <br class="clear" />
1445
 
1446
- <div id="form-details-nav">
1447
- <a href="<?php echo add_query_arg( array( 'form' => $form_nav_selected_id, 'details' => 'email' ), admin_url( 'options-general.php?page=visual-form-builder' ) ); ?>" class="<?php echo ( 'email' == $details_meta ) ? 'current' : ''; ?>" title="<?php _e( 'Customize Email Details' , 'visual-form-builder'); ?>"><?php _e( 'Email Details' , 'visual-form-builder'); ?></a>
1448
- <a href="<?php echo add_query_arg( array( 'form' => $form_nav_selected_id, 'details' => 'confirmation' ), admin_url( 'options-general.php?page=visual-form-builder' ) ); ?>" class="<?php echo ( 'confirmation' == $details_meta ) ? 'current' : ''; ?>" title="<?php _e( 'Customize Confirmation Message' , 'visual-form-builder'); ?>"><?php _e( 'Confirmation' , 'visual-form-builder'); ?></a>
1449
- <a href="<?php echo add_query_arg( array( 'form' => $form_nav_selected_id, 'details' => 'notification' ), admin_url( 'options-general.php?page=visual-form-builder' ) ); ?>" class="<?php echo ( 'notification' == $details_meta ) ? 'current' : ''; ?>" title="<?php _e( 'Customize Notification Email' , 'visual-form-builder'); ?>"><?php _e( 'Notification' , 'visual-form-builder'); ?></a>
1450
- </div>
1451
-
1452
- <div id="email-details" class="<?php echo ( 'email' == $details_meta ) ? 'form-details-current' : 'form-details'; ?>">
1453
- <p><em><?php _e( 'The forms you build here will send information to one or more email addresses when submitted by a user on your site. Use the fields below to customize the details of that email.' , 'visual-form-builder'); ?></em></p>
1454
-
1455
- <!-- E-mail Subject -->
1456
- <label for="form-email-subject" class="menu-name-label howto open-label">
1457
- <span class="sender-labels"><?php _e( 'E-mail Subject' , 'visual-form-builder'); ?></span>
1458
- <input type="text" value="<?php echo stripslashes( $form_subject ); ?>" class="menu-name regular-text menu-item-textbox" id="form-email-subject" name="form_email_subject" />
1459
- </label>
1460
- <br class="clear" />
1461
-
1462
- <!-- Sender Name -->
1463
- <label for="form-email-sender-name" class="menu-name-label howto open-label">
1464
- <span class="sender-labels"><?php _e( 'Sender Name' , 'visual-form-builder'); ?></span>
1465
- <input type="text" value="<?php echo $form_email_from_name; ?>" class="menu-name regular-text menu-item-textbox" id="form-email-sender-name" name="form_email_from_name"<?php echo ( $form_email_from_name_override != '' ) ? ' readonly="readonly"' : ''; ?> />
1466
- </label>
1467
- <span>OR</span>
1468
- <select name="form_email_from_name_override" id="form_email_from_name_override">
1469
- <option value="" <?php selected( $form_email_from_name_override, '' ); ?>><?php _e( 'Select a required text field' , 'visual-form-builder'); ?></option>
1470
- <?php
1471
- foreach( $senders as $sender ) {
1472
- echo '<option value="' . $sender->field_id . '"' . selected( $form_email_from_name_override, $sender->field_id ) . '>' . stripslashes( $sender->field_name ) . '</option>';
1473
- }
1474
- ?>
1475
- </select>
1476
- <br class="clear" />
1477
-
1478
- <!-- Sender E-mail -->
1479
- <label for="form-email-sender" class="menu-name-label howto open-label">
1480
- <span class="sender-labels"><?php _e( 'Sender E-mail' , 'visual-form-builder'); ?></span>
1481
- <input type="text" value="<?php echo $form_email_from; ?>" class="menu-name regular-text menu-item-textbox" id="form-email-sender" name="form_email_from"<?php echo ( $form_email_from_override != '' ) ? ' readonly="readonly"' : ''; ?> />
1482
- </label>
1483
- <span><?php _e( 'OR' , 'visual-form-builder'); ?></span>
1484
- <select name="form_email_from_override" id="form_email_from_override">
1485
- <option value="" <?php selected( $form_email_from_override, '' ); ?>><?php _e( 'Select a required text field with email validation' , 'visual-form-builder'); ?></option>
1486
- <?php
1487
- foreach( $emails as $email ) {
1488
- echo '<option value="' . $email->field_id . '"' . selected( $form_email_from_override, $email->field_id ) . '>' . stripslashes( $email->field_name ) . '</option>';
1489
- }
1490
- ?>
1491
- </select>
1492
- <br class="clear" />
1493
-
1494
- <!-- E-mail(s) To -->
1495
- <?php
1496
- /* Basic count to keep track of multiple options */
1497
- $count = 1;
1498
-
1499
- /* Loop through the options */
1500
- foreach ( $form_email_to as $email_to ) {
1501
- ?>
1502
- <div id="clone-email-<?php echo $count; ?>">
1503
- <label for="form-email-to-<?php echo "$count"; ?>" class="menu-name-label howto open-label clonedOption">
1504
- <span class="sender-labels"><?php _e( 'E-mail(s) To' , 'visual-form-builder'); ?></span>
1505
- <input type="text" value="<?php echo stripslashes( $email_to ); ?>" name="form_email_to[]" class="menu-name regular-text menu-item-textbox" id="form-email-to-<?php echo "$count"; ?>" />
1506
- </label>
1507
-
1508
- <a href="#" class="addEmail" title="Add an Email">Add</a> <a href="#" class="deleteEmail" title="Delete Email">Delete</a>
1509
- <br class="clear" />
1510
- </div>
1511
-
1512
- <?php
1513
- $count++;
1514
  }
1515
- ?>
1516
-
1517
- </div>
 
 
1518
 
1519
- <div id="confirmation-message" class="<?php echo ( 'confirmation' == $details_meta ) ? 'form-details-current' : 'form-details'; ?>">
1520
- <p><em><?php _e( "After someone submits a form, you can control what is displayed. By default, it's a message but you can send them to another WordPress Page or a custom URL." , 'visual-form-builder'); ?></em></p>
1521
- <label for="form-success-type-text" class="menu-name-label open-label">
1522
- <input type="radio" value="text" id="form-success-type-text" class="form-success-type" name="form_success_type" <?php checked( $form_success_type, 'text' ); ?> />
1523
- <span><?php _e( 'Text' , 'visual-form-builder'); ?></span>
1524
- </label>
1525
- <label for="form-success-type-page" class="menu-name-label open-label">
1526
- <input type="radio" value="page" id="form-success-type-page" class="form-success-type" name="form_success_type" <?php checked( $form_success_type, 'page' ); ?>/>
1527
- <span><?php _e( 'Page' , 'visual-form-builder'); ?></span>
1528
- </label>
1529
- <label for="form-success-type-redirect" class="menu-name-label open-label">
1530
- <input type="radio" value="redirect" id="form-success-type-redirect" class="form-success-type" name="form_success_type" <?php checked( $form_success_type, 'redirect' ); ?>/>
1531
- <span><?php _e( 'Redirect' , 'visual-form-builder'); ?></span>
1532
- </label>
1533
- <br class="clear" />
1534
-
1535
- <?php
1536
- /* If there's no text message, make sure there is something displayed by setting a default */
1537
- if ( $form_success_message === '' )
1538
- $default_text = sprintf( '<p id="form_success">%s</p>', __( 'Your form was successfully submitted. Thank you for contacting us.' , 'visual-form-builder') );
1539
- ?>
1540
- <textarea id="form-success-message-text" class="form-success-message<?php echo ( 'text' == $form_success_type ) ? ' active' : ''; ?>" name="form_success_message_text"><?php echo $default_text; ?><?php echo ( 'text' == $form_success_type ) ? $form_success_message : ''; ?></textarea>
1541
-
1542
- <?php
1543
- /* Display all Pages */
1544
- wp_dropdown_pages( array(
1545
- 'name' => 'form_success_message_page',
1546
- 'id' => 'form-success-message-page',
1547
- 'show_option_none' => __( 'Select a Page' , 'visual-form-builder'),
1548
- 'selected' => $form_success_message
1549
- ));
1550
- ?>
1551
- <input type="text" value="<?php echo ( 'redirect' == $form_success_type ) ? $form_success_message : ''; ?>" id="form-success-message-redirect" class="form-success-message regular-text<?php echo ( 'redirect' == $form_success_type ) ? ' active' : ''; ?>" name="form_success_message_redirect" />
1552
- <br class="clear" />
1553
-
1554
  </div>
1555
- <div id="notification" class="<?php echo ( 'notification' == $details_meta ) ? 'form-details-current' : 'form-details'; ?>">
1556
- <p><em><?php _e( "When a user submits their entry, you can send a customizable notification email." , 'visual-form-builder'); ?></em></p>
1557
- <label for="form-notification-setting">
1558
- <input type="checkbox" value="1" id="form-notification-setting" class="form-notification" name="form_notification_setting" <?php checked( $form_notification_setting, '1' ); ?> style="margin-top:-1px;margin-left:0;"/>
1559
- <?php _e( 'Send Confirmation Email to User' , 'visual-form-builder'); ?>
1560
- </label>
1561
- <br class="clear" />
1562
- <div id="notification-email">
1563
- <label for="form-notification-email-name" class="menu-name-label howto open-label">
1564
- <span class="sender-labels"><?php _e( 'Sender Name' , 'visual-form-builder'); ?></span>
1565
- <input type="text" value="<?php echo $form_notification_email_name; ?>" class="menu-name regular-text menu-item-textbox" id="form-notification-email-name" name="form_notification_email_name" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1566
  </label>
 
1567
  <br class="clear" />
1568
- <label for="form-notification-email-from" class="menu-name-label howto open-label">
1569
- <span class="sender-labels"><?php _e( 'Sender Email' , 'visual-form-builder'); ?></span>
1570
- <input type="text" value="<?php echo $form_notification_email_from; ?>" class="menu-name regular-text menu-item-textbox" id="form-notification-email-from" name="form_notification_email_from" />
 
 
 
 
 
1571
  </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1572
  <br class="clear" />
1573
- <label for="form-notification-email" class="menu-name-label howto open-label">
1574
- <span class="sender-labels"><?php _e( 'Send To' , 'visual-form-builder'); ?></span>
1575
 
1576
- <select name="form_notification_email" id="form-notification-email">
1577
- <option value="" <?php selected( $form_notification_email, '' ); ?>><?php _e( 'Select a required text field with email validation' , 'visual-form-builder'); ?></option>
1578
- <?php
1579
- foreach( $emails as $email ) {
1580
- echo '<option value="' . $email->field_id . '"' . selected( $form_notification_email, $email->field_id ) . '>' . $email->field_name . '</option>';
1581
- }
1582
- ?>
1583
- </select></label>
1584
- <br class="clear" />
1585
- <label for="form-notification-subject" class="menu-name-label howto open-label">
1586
- <span class="sender-labels"><?php _e( 'Subject' , 'visual-form-builder'); ?></span>
1587
- <input type="text" value="<?php echo $form_notification_subject; ?>" class="menu-name regular-text menu-item-textbox" id="form-notification-subject" name="form_notification_subject" />
1588
  </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1589
  <br class="clear" />
1590
- <label for="form-notification-message" class="menu-name-label howto open-label"><?php _e( 'Message' , 'visual-form-builder'); ?></label>
1591
- <br class="clear" />
1592
- <textarea id="form-notification-message" class="form-notification-message" name="form_notification_message"><?php echo $form_notification_message; ?></textarea>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1593
  <br class="clear" />
1594
- <label for="form-notification-entry">
1595
- <input type="checkbox" value="1" id="form-notification-entry" class="form-notification" name="form_notification_entry" <?php checked( $form_notification_entry, '1' ); ?> style="margin-top:-1px;margin-left:0;"/>
1596
- <?php _e( "Include a Copy of the User's Entry" , 'visual-form-builder'); ?>
1597
- </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1598
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1599
  </div>
1600
  <?php endif; ?>
1601
- <br class="clear" />
1602
  <div class="publishing-action">
1603
  <input type="submit" value="<?php echo ( $action == 'create_form' ) ? __( 'Create Form' , 'visual-form-builder') : __( 'Save Form' , 'visual-form-builder'); ?>" class="button-primary menu-save" id="save_form" name="save_form" />
1604
  </div>
1605
- <?php if ( !empty( $form_nav_selected_id ) ) : ?>
1606
- <div class="delete-action">
1607
- <a class="submitdelete deletion menu-delete" href="<?php echo esc_url( wp_nonce_url( admin_url('options-general.php?page=visual-form-builder&amp;action=delete_form&amp;form=' . $form_nav_selected_id ), 'delete-form-' . $form_nav_selected_id ) ); ?>"><?php _e( 'Delete Form' , 'visual-form-builder'); ?></a>
1608
- </div>
1609
- <?php endif; ?>
1610
  </div>
1611
  </div>
1612
  </div>
@@ -1645,9 +1814,11 @@ class Visual_Form_Builder{
1645
  <p>Attention Visual Form Builder users! I am happy to announce <a href="http://vfb.matthewmuro.com">Visual Form Builder Pro</a>, available now for only <strong>$10</strong>.</p>
1646
  <h3><?php _e( 'New Features of Visual Form Builder Pro' , 'visual-form-builder'); ?></h3>
1647
  <ul>
1648
- <li><?php _e( '10 new Form Fields (Username, Password, Color Picker, Autocomplete, and more)' , 'visual-form-builder'); ?></li>
 
1649
  <li><?php _e( 'Edit and Update Entries' , 'visual-form-builder'); ?></li>
1650
  <li><?php _e( 'Quality HTML Email Template' , 'visual-form-builder'); ?></li>
 
1651
  <li><?php _e( 'Email Designer' , 'visual-form-builder'); ?></li>
1652
  <li><?php _e( 'Analytics' , 'visual-form-builder'); ?></li>
1653
  <li><?php _e( 'Data &amp; Form Migration' , 'visual-form-builder'); ?></li>
@@ -1778,8 +1949,8 @@ class Visual_Form_Builder{
1778
  $verification = '';
1779
 
1780
  foreach ( $forms as $form ) :
1781
-
1782
- $output = '<form id="' . $form->form_key . '" class="visual-form-builder" method="post" enctype="multipart/form-data">
1783
  <input type="hidden" name="form_id" value="' . $form->form_id . '" />';
1784
  $output .= wp_nonce_field( 'visual-form-builder-nonce', '_wpnonce', false, false );
1785
 
@@ -1851,8 +2022,14 @@ class Visual_Form_Builder{
1851
  $validation = ' {digits:true,maxlength:2,minlength:2}';
1852
  $verification .= '<li class="item item-' . $field->field_type . '"' . $logged_in_display . '><label for="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" class="desc">'. stripslashes( $field->field_name ) . $required_span . '</label>';
1853
 
 
 
 
 
 
 
1854
  if ( !empty( $field->field_description ) )
1855
- $verification .= '<span><input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="' . $logged_in_value . '" class="text ' . $field->field_size . $required . $validation . $css . '" /><label>' . stripslashes( $field->field_description ) . '</label></span>';
1856
  else
1857
  $verification .= '<input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="' . $logged_in_value . '" class="text ' . $field->field_size . $required . $validation . $css . '" />';
1858
  }
@@ -1869,7 +2046,7 @@ class Visual_Form_Builder{
1869
  case 'phone' :
1870
 
1871
  if ( !empty( $field->field_description ) )
1872
- $output .= '<span><input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text ' . $field->field_size . $required . $validation . $css . '" /><label>' . stripslashes( $field->field_description ) . '</label></span>';
1873
  else
1874
  $output .= '<input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text ' . $field->field_size . $required . $validation . $css . '" />';
1875
 
@@ -1878,7 +2055,7 @@ class Visual_Form_Builder{
1878
  case 'textarea' :
1879
 
1880
  if ( !empty( $field->field_description ) )
1881
- $output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
1882
 
1883
  $output .= '<textarea name="vfb-'. esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-'. esc_html( $field->field_key ) . '-' . $field->field_id . '" class="textarea ' . $field->field_size . $required . $css . '"></textarea>';
1884
 
@@ -1886,7 +2063,7 @@ class Visual_Form_Builder{
1886
 
1887
  case 'select' :
1888
  if ( !empty( $field->field_description ) )
1889
- $output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
1890
 
1891
  $output .= '<select name="vfb-'. esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-'. esc_html( $field->field_key ) . '-' . $field->field_id . '" class="select ' . $field->field_size . $required . $css . '">';
1892
 
@@ -1904,7 +2081,7 @@ class Visual_Form_Builder{
1904
  case 'radio' :
1905
 
1906
  if ( !empty( $field->field_description ) )
1907
- $output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
1908
 
1909
  $options = ( is_array( unserialize( $field->field_options ) ) ) ? unserialize( $field->field_options ) : explode( ',', unserialize( $field->field_options ) );
1910
 
@@ -1925,7 +2102,7 @@ class Visual_Form_Builder{
1925
  case 'checkbox' :
1926
 
1927
  if ( !empty( $field->field_description ) )
1928
- $output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
1929
 
1930
  $options = ( is_array( unserialize( $field->field_options ) ) ) ? unserialize( $field->field_options ) : explode( ',', unserialize( $field->field_options ) );
1931
 
@@ -1945,7 +2122,7 @@ class Visual_Form_Builder{
1945
  case 'address' :
1946
 
1947
  if ( !empty( $field->field_description ) )
1948
- $output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
1949
 
1950
  $countries = array( "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "Colombi", "Comoros", "Congo (Brazzaville)", "Congo", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor (Timor Timur)", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepa", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States of America", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe" );
1951
  $output .= '<div>
@@ -1990,7 +2167,7 @@ class Visual_Form_Builder{
1990
  case 'date' :
1991
 
1992
  if ( !empty( $field->field_description ) )
1993
- $output .= '<span><input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text vfb-date-picker ' . $field->field_size . $required . $css . '" /><label>' . stripslashes( $field->field_description ) . '</label></span>';
1994
  else
1995
  $output .= '<input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text vfb-date-picker ' . $field->field_size . $required . $css . '" />';
1996
 
@@ -1998,7 +2175,7 @@ class Visual_Form_Builder{
1998
 
1999
  case 'time' :
2000
  if ( !empty( $field->field_description ) )
2001
- $output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
2002
 
2003
  /* Get the time format (12 or 24) */
2004
  $time_format = str_replace( 'time-', '', $validation );
@@ -2033,7 +2210,7 @@ class Visual_Form_Builder{
2033
  case 'html' :
2034
 
2035
  if ( !empty( $field->field_description ) )
2036
- $output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
2037
 
2038
  $output .= '<script type="text/javascript">edToolbar("vfb-' . $field->field_key . '-' . $field->field_id . '");</script>';
2039
  $output .= '<textarea name="vfb-'. $field->field_key . '-' . $field->field_id . '" id="vfb-'. $field->field_key . '-' . $field->field_id . '" class="textarea vfbEditor ' . $field->field_size . $required . $css . '"></textarea>';
@@ -2061,7 +2238,7 @@ class Visual_Form_Builder{
2061
 
2062
  case 'submit' :
2063
 
2064
- $submit = $field->field_name;
2065
 
2066
  break;
2067
 
@@ -2120,8 +2297,19 @@ class Visual_Form_Builder{
2120
  public function email() {
2121
  global $wpdb, $post;
2122
 
2123
- /* Security check before moving any further */
2124
- //if ( isset( $_REQUEST['visual-form-builder-submit'] ) && $_REQUEST['vfb-spam'] == '' && is_numeric( $_REQUEST['vfb-secret'] ) && strlen( $_REQUEST['vfb-secret'] ) == 2 ) :
 
 
 
 
 
 
 
 
 
 
 
2125
  if ( isset( $_REQUEST['visual-form-builder-submit'] ) && $_REQUEST['vfb-spam'] == '' ) :
2126
  $nonce = $_REQUEST['_wpnonce'];
2127
 
@@ -2195,6 +2383,8 @@ class Visual_Form_Builder{
2195
  /* Build our forms as an object */
2196
  $fields = $wpdb->get_results( $query );
2197
 
 
 
2198
 
2199
  /* Prepare the beginning of the content */
2200
  $message = '<html><body><table rules="all" style="border-color: #666;" cellpadding="10">';
@@ -2206,6 +2396,13 @@ class Visual_Form_Builder{
2206
  $value = $_FILES[ 'vfb-' . $field->field_key . '-' . $field->field_id ];
2207
 
2208
  if ( $value['size'] > 0 ) {
 
 
 
 
 
 
 
2209
  /* Options array for the wp_handle_upload function. 'test_form' => false */
2210
  $upload_overrides = array( 'test_form' => false );
2211
 
@@ -2217,6 +2414,32 @@ class Visual_Form_Builder{
2217
 
2218
  /* If the wp_handle_upload call returned a local path for the image */
2219
  if ( isset( $uploaded_file['file'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2220
  $attachments[ 'vfb-' . $field->field_key . '-' . $field->field_id ] = $uploaded_file['file'];
2221
 
2222
  $data[] = array(
@@ -2291,6 +2514,22 @@ class Visual_Form_Builder{
2291
  else
2292
  $value = html_entity_decode( stripslashes( esc_html( $value ) ), ENT_QUOTES, 'UTF-8' );
2293
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2294
  //if ( $field->field_type !== 'submit' ) {
2295
  if ( !in_array( $field->field_type , array( 'verification', 'secret', 'submit' ) ) ) {
2296
  if ( $field->field_type == 'fieldset' )
@@ -2329,7 +2568,7 @@ class Visual_Form_Builder{
2329
  $wpdb->insert( $this->entries_table_name, $entry );
2330
 
2331
  /* Close out the content */
2332
- $message .= '<tr><td class="footer" height="61" align="left" valign="middle"><p style="font-size: 12px; font-weight: normal; margin: 0; line-height: 16px; padding: 0;">This email was built and sent using <a href="http://wordpress.org/extend/plugins/visual-form-builder/" style="font-size: 12px;">Visual Form Builder</a>.</p></td></tr></table></body></html>';
2333
 
2334
  /* Initialize header filter vars */
2335
  $this->header_from_name = stripslashes( $form_from_name );
@@ -2384,6 +2623,70 @@ class Visual_Form_Builder{
2384
  endif;
2385
  }
2386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2387
  /**
2388
  * Set the wp_mail_from_name
2389
  *
4
  Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
5
  Author: Matthew Muro
6
  Author URI: http://matthewmuro.com
7
+ Version: 2.2
8
  */
9
 
10
  /*
28
  /* Restrict Categories class */
29
  class Visual_Form_Builder{
30
 
31
+ protected $vfb_db_version = '2.2';
32
 
33
  public function __construct(){
34
  global $wpdb;
47
  add_action( 'wp_ajax_visual_form_builder_process_sort', array( &$this, 'process_sort_callback' ) );
48
  add_action( 'wp_ajax_visual_form_builder_create_field', array( &$this, 'create_field_callback' ) );
49
  add_action( 'wp_ajax_visual_form_builder_delete_field', array( &$this, 'delete_field_callback' ) );
50
+ add_action( 'wp_ajax_visual_form_builder_form_settings', array( &$this, 'form_settings_callback' ) );
51
 
52
  add_action( 'load-settings_page_visual-form-builder', array( &$this, 'add_contextual_help' ) );
53
  add_action( 'admin_init', array( &$this, 'export_entries' ) );
 
 
 
54
 
55
  /* Load the includes files */
56
  add_action( 'plugins_loaded', array( &$this, 'includes' ) );
82
  add_action('admin_notices', array( &$this, 'admin_notices' ) );
83
  }
84
 
85
+ /* Load i18n */
86
+ load_plugin_textdomain( 'visual-form-builder', false , basename( dirname( __FILE__ ) ) . '/languages' );
87
+
88
  add_shortcode( 'vfb', array( &$this, 'form_code' ) );
89
  add_action( 'init', array( &$this, 'email' ), 10 );
90
  add_action( 'init', array( &$this, 'confirmation' ), 12 );
339
  form_notification_subject VARCHAR(255),
340
  form_notification_message TEXT,
341
  form_notification_entry VARCHAR(25),
342
+ form_label_alignment VARCHAR(25),
343
  UNIQUE KEY (form_id)
344
  ) DEFAULT CHARACTER SET $charset COLLATE $collate;";
345
 
544
  $form_notification_subject = esc_html( $_REQUEST['form_notification_subject'] );
545
  $form_notification_message = wp_richedit_pre( $_REQUEST['form_notification_message'] );
546
  $form_notification_entry = esc_html( $_REQUEST['form_notification_entry'] );
547
+ $form_label_alignment = esc_html( $_REQUEST['form_label_alignment'] );
548
 
549
  /* Add confirmation based on which type was selected */
550
  switch ( $form_success_type ) {
578
  'form_notification_email' => $form_notification_email,
579
  'form_notification_subject' => $form_notification_subject,
580
  'form_notification_message' => $form_notification_message,
581
+ 'form_notification_entry' => $form_notification_entry,
582
+ 'form_label_alignment' => $form_label_alignment
583
  );
584
 
585
  $where = array(
756
  'form_notification_email' => $form->form_notification_email,
757
  'form_notification_subject' => $form->form_notification_subject,
758
  'form_notification_message' => $form->form_notification_message,
759
+ 'form_notification_entry' => $form->form_notification_entry,
760
+ 'form_label_alignment' => $form->form_label_alignment
761
  );
762
 
763
  $wpdb->insert( $this->form_table_name, $data );
787
  $wpdb->insert( $this->field_table_name, $data );
788
 
789
  /* If a parent field, save the old ID and the new ID to update new parent ID */
790
+ if ( in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ) ) )
791
  $parents[ $field->field_id ] = $wpdb->insert_id;
792
 
793
  if ( $override == $field->field_id )
945
 
946
  die(1);
947
  }
948
+
949
+ /**
950
+ * The jQuery form settings callback
951
+ *
952
+ * @since 2.2
953
+ */
954
+ public function form_settings_callback() {
955
+ global $current_user;
956
+ get_currentuserinfo();
957
+
958
+ if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'visual_form_builder_form_settings' ) {
959
+ $form_id = absint( $_REQUEST['form'] );
960
+ $status = isset( $_REQUEST['status'] ) ? $_REQUEST['status'] : 'opened';
961
+ $accordion = isset( $_REQUEST['accordion'] ) ? $_REQUEST['accordion'] : 'general-settings';
962
+ $user_id = $current_user->ID;
963
+
964
+ $form_settings = get_user_meta( $user_id, 'vfb-form-settings', true );
965
+
966
+ $array = array(
967
+ 'form_setting_tab' => $status,
968
+ 'setting_accordion' => $accordion
969
+ );
970
+
971
+ /* Set defaults if meta key doesn't exist */
972
+ if ( !$form_settings || $form_settings == '' ) {
973
+ $meta_value[ $form_id ] = $array;
974
+
975
+ update_user_meta( $user_id, 'vfb-form-settings', $meta_value );
976
+ }
977
+ else {
978
+ $form_settings[ $form_id ] = $array;
979
+
980
+ update_user_meta( $user_id, 'vfb-form-settings', $form_settings );
981
+ }
982
+ }
983
+
984
+ die(1);
985
+ }
986
 
987
  /**
988
  * Build field output in admin
1049
  <?php if ( in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ) ) ) : ?>
1050
 
1051
  <p class="description description-wide">
1052
+ <label for="edit-form-item-name-<?php echo $field->field_id; ?>"><?php echo ( in_array( $field->field_type, array( 'fieldset', 'verification' ) ) ) ? 'Legend' : 'Name'; ?>
1053
+ <span class="vfb-tooltip" rel="For Fieldsets, a Legend is simply the name of that group. Use general terms that describe the fields included in this Fieldset." title="About Legend">(?)</span>
1054
+ <br />
1055
+ <input type="text" value="<?php echo stripslashes( $field->field_name ); ?>" name="field_name-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-name-<?php echo $field->field_id; ?>" maxlength="255" />
1056
  </label>
1057
  </p>
1058
  <p class="description description-wide">
1059
  <label for="edit-form-item-css-<?php echo $field->field_id; ?>">
1060
+ <?php _e( 'CSS Classes' , 'visual-form-builder'); ?>
1061
+ <span class="vfb-tooltip" rel="For each field, you can insert your own CSS class names which can be used in your own stylesheets." title="About CSS Classes">(?)</span>
1062
+ <br />
1063
  <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_css ) ); ?>" name="field_css-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-css-<?php echo $field->field_id; ?>" />
1064
  </label>
1065
  </p>
1068
  <!-- Instructions -->
1069
  <p class="description description-wide">
1070
  <label for="edit-form-item-name-<?php echo $field->field_id; ?>">
1071
+ <?php _e( 'Name' , 'visual-form-builder'); ?>
1072
+ <span class="vfb-tooltip" title="About Name" rel="A field's name is the most visible and direct way to describe what that field is for.">(?)</span>
1073
+ <br />
1074
+ <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_name ) ); ?>" name="field_name-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-name-<?php echo $field->field_id; ?>" maxlength="255" />
1075
  </label>
1076
  </p>
1077
  <p class="description description-wide">
1078
+ <label for="edit-form-item-description-<?php echo $field->field_id; ?>">
1079
+ <?php _e( 'Description (HTML tags allowed)', 'visual-form-builder' ); ?>
1080
+ <span class="vfb-tooltip" title="About Instructions Description" rel="The Instructions field allows for long form explanations, typically seen at the beginning of Fieldsets or Sections. HTML tags are allowed.">(?)</span>
1081
+ <br />
1082
  <textarea name="field_description-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-description-<?php echo $field->field_id; ?>" /><?php echo stripslashes( $field->field_description ); ?></textarea>
1083
  </label>
1084
  </p>
1085
  <p class="description description-wide">
1086
  <label for="edit-form-item-css-<?php echo $field->field_id; ?>">
1087
+ <?php _e( 'CSS Classes' , 'visual-form-builder'); ?>
1088
+ <span class="vfb-tooltip" title="About CSS Classes" rel="For each field, you can insert your own CSS class names which can be used in your own stylesheets.">(?)</span>
1089
+ <br />
1090
+ <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_css ) ); ?>" name="field_css-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-css-<?php echo $field->field_id; ?>" maxlength="255" />
1091
  </label>
1092
  </p>
1093
 
1096
  <!-- Name -->
1097
  <p class="description description-wide">
1098
  <label for="edit-form-item-name-<?php echo $field->field_id; ?>">
1099
+ <?php _e( 'Name' , 'visual-form-builder'); ?>
1100
+ <span class="vfb-tooltip" title="About Name" rel="A field's name is the most visible and direct way to describe what that field is for.">(?)</span>
1101
+ <br />
1102
+ <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_name ) ); ?>" name="field_name-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-name-<?php echo $field->field_id; ?>" maxlength="255" />
1103
  </label>
1104
  </p>
1105
  <?php if ( $field->field_type !== 'submit' ) : ?>
1106
  <!-- Description -->
1107
  <p class="description description-wide">
1108
  <label for="edit-form-item-description-<?php echo $field->field_id; ?>">
1109
+ <?php _e( 'Description' , 'visual-form-builder'); ?>
1110
+ <span class="vfb-tooltip" title="About Description" rel="A description is an optional piece of text that further explains the meaning of this field. Descriptions are displayed below the field. HTML tags are allowed.">(?)</span>
1111
+ <br />
1112
  <input type="text" value="<?php echo stripslashes( $field->field_description ); ?>" name="field_description-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-description-<?php echo $field->field_id; ?>" />
1113
  </label>
1114
  </p>
1119
  <!-- Options -->
1120
  <p class="description description-wide">
1121
  <?php _e( 'Options' , 'visual-form-builder'); ?>
1122
+ <span class="vfb-tooltip" title="About Options" rel="This property allows you to set predefined options to be selected by the user. Use the plus and minus buttons to add and delete options. At least one option must exist.">(?)</span>
1123
+ <br />
1124
  <?php
1125
  /* If the options field isn't empty, unserialize and build array */
1126
  if ( !empty( $field->field_options ) ) {
1175
  ?>
1176
  <label for="edit-form-item-options-<?php echo $field->field_id; ?>">
1177
  <?php _e( 'Accepted File Extensions' , 'visual-form-builder'); ?>
1178
+ <span class="vfb-tooltip" title="About Accepted File Extensions" rel="Control the types of files allowed. Enter extensions without periods and separate multiples using the pipe character ( | ).">(?)</span>
1179
+ <br />
1180
  <input type="text" value="<?php echo stripslashes( $options ); ?>" name="field_options-<?php echo $field->field_id; ?>[]" class="widefat" id="edit-form-item-options-<?php echo $field->field_id; ?>" />
1181
  </label>
1182
  </p>
1189
  <!-- Validation -->
1190
  <p class="description description-thin">
1191
  <label for="edit-form-item-validation">
1192
+ <?php _e( 'Validation' , 'visual-form-builder'); ?>
1193
+ <span class="vfb-tooltip" title="About Validation" rel="Ensures user-entered data is formatted properly. For more information on Validation, refer to the Help tab at the top of this page.">(?)</span>
1194
+ <br />
1195
  <select name="field_validation-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-validation-<?php echo $field->field_id; ?>"<?php echo ( in_array( $field->field_type, array( 'radio', 'select', 'checkbox', 'address', 'date', 'textarea', 'html', 'file-upload', 'secret' ) ) ) ? ' disabled="disabled"' : ''; ?>>
1196
  <?php if ( $field->field_type == 'time' ) : ?>
1197
  <option value="time-12" <?php selected( $field->field_validation, 'time-12' ); ?>><?php _e( '12 Hour Format' , 'visual-form-builder'); ?></option>
1212
  <!-- Required -->
1213
  <p class="field-link-target description description-thin">
1214
  <label for="edit-form-item-required">
1215
+ <?php _e( 'Required' , 'visual-form-builder'); ?>
1216
+ <span class="vfb-tooltip" title="About Required" rel="Requires the field to be completed before the form is submitted. By default, all fields are set to No.">(?)</span>
1217
+ <br />
1218
  <select name="field_required-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-required-<?php echo $field->field_id; ?>">
1219
  <option value="no" <?php selected( $field->field_required, 'no' ); ?>><?php _e( 'No' , 'visual-form-builder'); ?></option>
1220
  <option value="yes" <?php selected( $field->field_required, 'yes' ); ?>><?php _e( 'Yes' , 'visual-form-builder'); ?></option>
1226
  <!-- Size -->
1227
  <p class="description description-thin">
1228
  <label for="edit-form-item-size">
1229
+ <?php _e( 'Size' , 'visual-form-builder'); ?>
1230
+ <span class="vfb-tooltip" title="About Size" rel="Control the size of the field. By default, all fields are set to Medium.">(?)</span>
1231
+ <br />
1232
  <select name="field_size-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-size-<?php echo $field->field_id; ?>">
1233
  <option value="small" <?php selected( $field->field_size, 'small' ); ?>><?php _e( 'Small' , 'visual-form-builder'); ?></option>
1234
  <option value="medium" <?php selected( $field->field_size, 'medium' ); ?>><?php _e( 'Medium' , 'visual-form-builder'); ?></option>
1241
  <!-- Options Layout -->
1242
  <p class="description description-thin">
1243
  <label for="edit-form-item-size">
1244
+ <?php _e( 'Options Layout' , 'visual-form-builder'); ?>
1245
+ <span class="vfb-tooltip" title="About Options Layout" rel="Control the layout of radio buttons or checkboxes. By default, options are arranged in One Column.">(?)</span>
1246
+ <br />
1247
  <select name="field_size-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-size-<?php echo $field->field_id; ?>"<?php echo ( $field->field_type == 'time' ) ? ' disabled="disabled"' : ''; ?>>
1248
  <option value="" <?php selected( $field->field_size, '' ); ?>><?php _e( 'One Column' , 'visual-form-builder'); ?></option>
1249
  <option value="two-column" <?php selected( $field->field_size, 'two-column' ); ?>><?php _e( 'Two Columns' , 'visual-form-builder'); ?></option>
1257
  <!-- Field Layout -->
1258
  <p class="description description-thin">
1259
  <label for="edit-form-item-layout">
1260
+ <?php _e( 'Field Layout' , 'visual-form-builder'); ?>
1261
+ <span class="vfb-tooltip" title="About Field Layout" rel="Used to create advanced layouts. Align fields side by side in various configurations.">(?)</span>
1262
+ <br />
1263
  <select name="field_layout-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-layout-<?php echo $field->field_id; ?>">
1264
 
1265
  <option value="" <?php selected( $field->field_layout, '' ); ?>><?php _e( 'Default' , 'visual-form-builder'); ?></option>
1281
  </p>
1282
  <p class="description description-wide">
1283
  <label for="edit-form-item-css-<?php echo $field->field_id; ?>">
1284
+ <?php _e( 'CSS Classes' , 'visual-form-builder'); ?>
1285
+ <span class="vfb-tooltip" title="About CSS Classes" rel="For each field, you can insert your own CSS class names which can be used in your own stylesheets.">(?)</span>
1286
+ <br />
1287
+ <input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_css ) ); ?>" name="field_css-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-css-<?php echo $field->field_id; ?>" maxlength="255" />
1288
  </label>
1289
  </p>
1290
 
1506
  <span class="sender-labels"><?php _e( 'Form Name' , 'visual-form-builder'); ?></span>
1507
  <input type="text" value="<?php echo ( isset( $form_title ) ) ? $form_title : ''; ?>" title="Enter form name here" class="menu-name regular-text menu-item-textbox" id="form-name" name="form_title" />
1508
  </label>
 
 
 
 
 
1509
  <?php
1510
  /* Display sender details and confirmation message if we're on a form, otherwise just the form name */
1511
  if ( $form_nav_selected_id !== '0' ) :
1512
  ?>
1513
  <br class="clear" />
1514
 
1515
+ <?php
1516
+ /* Get the current user */
1517
+ global $current_user;
1518
+ get_currentuserinfo();
1519
+
1520
+ /* Save current user ID */
1521
+ $user_id = $current_user->ID;
1522
+
1523
+ /* Get the Form Setting drop down and accordion settings, if any */
1524
+ $user_form_settings = get_user_meta( $user_id, 'vfb-form-settings' );
1525
+
1526
+ /* Setup defaults for the Form Setting tab and accordion */
1527
+ $settings_tab = 'closed';
1528
+ $settings_accordion = 'general-settings';
1529
+
1530
+ /* Loop through the user_meta array */
1531
+ foreach( $user_form_settings as $set ) {
1532
+ /* If form settings exist for this form, use them instead of the defaults */
1533
+ if ( isset( $set[ $form_id ] ) ) {
1534
+ $settings_tab = $set[ $form_id ]['form_setting_tab'];
1535
+ $settings_accordion = $set[ $form_id ]['setting_accordion'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1536
  }
1537
+ }
1538
+
1539
+ /* If tab is opened, set current class */
1540
+ $opened_tab = ( $settings_tab == 'opened' ) ? 'current' : '';
1541
+ ?>
1542
 
1543
+ <div class="button-group">
1544
+ <a href="#form-settings" id="form-settings-button" class="vfb-button vfb-first <?php echo $opened_tab; ?>"><?php _e( 'Form Settings' , 'visual-form-builder'); ?><span class="button-icon arrow"></span></a>
1545
+ <a href="<?php echo esc_url( wp_nonce_url( admin_url('options-general.php?page=visual-form-builder&amp;action=copy_form&amp;form=' . $form_nav_selected_id ), 'copy-form-' . $form_nav_selected_id ) ); ?>" class="vfb-button vfb-duplicate"><?php _e( 'Duplicate Form' , 'visual-form-builder'); ?><span class="button-icon plus"></span></a>
1546
+ <a href="<?php echo esc_url( wp_nonce_url( admin_url('options-general.php?page=visual-form-builder&amp;action=delete_form&amp;form=' . $form_nav_selected_id ), 'delete-form-' . $form_nav_selected_id ) ); ?>" class="vfb-button vfb-delete vfb-last menu-delete"><?php _e( 'Delete Form' , 'visual-form-builder'); ?><span class="button-icon delete"></span></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1547
  </div>
1548
+
1549
+ <div id="form-settings" class="<?php echo $opened_tab; ?>">
1550
+ <!-- General settings section -->
1551
+ <a href="#general-settings" class="settings-links<?php echo ( $settings_accordion == 'general-settings' ) ? ' on' : ''; ?>">1. General<span class="arrow"></span></a>
1552
+ <div id="general-settings" class="form-details<?php echo ( $settings_accordion == 'general-settings' ) ? ' on' : ''; ?>">
1553
+ <!-- Label Alignment -->
1554
+ <p class="description description-wide">
1555
+ <label for="form-label-alignment">
1556
+ <?php _e( 'Label Alignment' , 'visual-form-builder'); ?>
1557
+ <span class="vfb-tooltip" title="About Label Alignment" rel="Set the field labels for this form to be aligned either on top, to the left, or to the right. By default, all labels are aligned on top of the inputs.">(?)</span>
1558
+ <br />
1559
+ </label>
1560
+ <select name="form_label_alignment" id="form-label-alignment" class="widefat">
1561
+ <option value="" <?php selected( $form_label_alignment, '' ); ?>><?php _e( 'Top Aligned' , 'visual-form-builder'); ?></option>
1562
+ <option value="left-label" <?php selected( $form_label_alignment, 'left-label' ); ?>><?php _e( 'Left Aligned' , 'visual-form-builder'); ?></option>
1563
+ <option value="right-label" <?php selected( $form_label_alignment, 'right-label' ); ?>><?php _e( 'Right Aligned' , 'visual-form-builder'); ?></option>
1564
+ </select>
1565
+ </p>
1566
+ <br class="clear" />
1567
+ </div>
1568
+
1569
+ <!-- Email section -->
1570
+ <a href="#email-details" class="settings-links<?php echo ( $settings_accordion == 'email-details' ) ? ' on' : ''; ?>">2. Email<span class="arrow"></span></a>
1571
+ <div id="email-details" class="form-details<?php echo ( $settings_accordion == 'email-details' ) ? ' on' : ''; ?>">
1572
+
1573
+ <p><em><?php _e( 'The forms you build here will send information to one or more email addresses when submitted by a user on your site. Use the fields below to customize the details of that email.' , 'visual-form-builder'); ?></em></p>
1574
+
1575
+ <!-- E-mail Subject -->
1576
+ <p class="description description-wide">
1577
+ <label for="form-email-subject">
1578
+ <?php _e( 'E-mail Subject' , 'visual-form-builder'); ?>
1579
+ <span class="vfb-tooltip" title="About E-mail Subject" rel="This option sets the subject of the email that is sent to the emails you have set in the E-mail(s) To field.">(?)</span>
1580
+ <br />
1581
+ <input type="text" value="<?php echo stripslashes( $form_subject ); ?>" class="widefat" id="form-email-subject" name="form_email_subject" />
1582
  </label>
1583
+ </p>
1584
  <br class="clear" />
1585
+
1586
+ <!-- Sender Name -->
1587
+ <p class="description description-thin">
1588
+ <label for="form-email-sender-name">
1589
+ <?php _e( 'Your Name or Company' , 'visual-form-builder'); ?>
1590
+ <span class="vfb-tooltip" title="About Your Name or Company" rel="This option sets the From display name of the email that is sent to the emails you have set in the E-mail(s) To field.">(?)</span>
1591
+ <br />
1592
+ <input type="text" value="<?php echo $form_email_from_name; ?>" class="widefat" id="form-email-sender-name" name="form_email_from_name"<?php echo ( $form_email_from_name_override != '' ) ? ' readonly="readonly"' : ''; ?> />
1593
  </label>
1594
+ </p>
1595
+ <p class="description description-thin">
1596
+ <label for="form_email_from_name_override">
1597
+ <?php _e( "User's Name (optional)" , 'visual-form-builder'); ?>
1598
+ <span class="vfb-tooltip" title="About User's Name" rel="Select a required text field from your form to use as the From display name in the email.">(?)</span>
1599
+ <br />
1600
+ <select name="form_email_from_name_override" id="form_email_from_name_override" class="widefat">
1601
+ <option value="" <?php selected( $form_email_from_name_override, '' ); ?>><?php _e( 'Select a required text field' , 'visual-form-builder'); ?></option>
1602
+ <?php
1603
+ foreach( $senders as $sender ) {
1604
+ echo '<option value="' . $sender->field_id . '"' . selected( $form_email_from_name_override, $sender->field_id ) . '>' . stripslashes( $sender->field_name ) . '</option>';
1605
+ }
1606
+ ?>
1607
+ </select>
1608
+ </label>
1609
+ </p>
1610
  <br class="clear" />
 
 
1611
 
1612
+ <!-- Sender E-mail -->
1613
+ <p class="description description-thin">
1614
+ <label for="form-email-sender">
1615
+ <?php _e( 'Reply-To E-mail' , 'visual-form-builder'); ?>
1616
+ <span class="vfb-tooltip" title="About Reply-To Email" rel="Manually set the email address that users will reply to.">(?)</span>
1617
+ <br />
1618
+ <input type="text" value="<?php echo $form_email_from; ?>" class="widefat" id="form-email-sender" name="form_email_from"<?php echo ( $form_email_from_override != '' ) ? ' readonly="readonly"' : ''; ?> />
 
 
 
 
 
1619
  </label>
1620
+ </p>
1621
+ <p class="description description-thin">
1622
+ <label for="form_email_from_override">
1623
+ <?php _e( "User's E-mail (optional)" , 'visual-form-builder'); ?>
1624
+ <span class="vfb-tooltip" title="About User's Email" rel="Select a required email field from your form to use as the Reply-To email.">(?)</span>
1625
+ <br />
1626
+ <select name="form_email_from_override" id="form_email_from_override" class="widefat">
1627
+ <option value="" <?php selected( $form_email_from_override, '' ); ?>><?php _e( 'Select a required email field' , 'visual-form-builder'); ?></option>
1628
+ <?php
1629
+ foreach( $emails as $email ) {
1630
+ echo '<option value="' . $email->field_id . '"' . selected( $form_email_from_override, $email->field_id ) . '>' . stripslashes( $email->field_name ) . '</option>';
1631
+ }
1632
+ ?>
1633
+ </select>
1634
+ </label>
1635
+ </p>
1636
  <br class="clear" />
1637
+
1638
+ <!-- E-mail(s) To -->
1639
+ <?php
1640
+ /* Basic count to keep track of multiple options */
1641
+ $count = 1;
1642
+
1643
+ /* Loop through the options */
1644
+ foreach ( $form_email_to as $email_to ) {
1645
+ ?>
1646
+ <div id="clone-email-<?php echo $count; ?>" class="option">
1647
+ <p class="description description-wide">
1648
+ <label for="form-email-to-<?php echo "$count"; ?>" class="clonedOption">
1649
+ <?php _e( 'E-mail(s) To' , 'visual-form-builder'); ?>
1650
+ <span class="vfb-tooltip" title="About E-mail(s) To" rel="This option sets single or multiple emails to send the submitted form data to. At least one email is required.">(?)</span>
1651
+ <br />
1652
+ <input type="text" value="<?php echo stripslashes( $email_to ); ?>" name="form_email_to[]" class="widefat" id="form-email-to-<?php echo "$count"; ?>" />
1653
+ </label>
1654
+
1655
+ <a href="#" class="addEmail" title="Add an Email">Add</a> <a href="#" class="deleteEmail" title="Delete Email">Delete</a>
1656
+
1657
+ </p>
1658
+ <br class="clear" />
1659
+ </div>
1660
+ <?php
1661
+ $count++;
1662
+ }
1663
+ ?>
1664
+ </div>
1665
+
1666
+ <!-- Confirmation section -->
1667
+ <a href="#confirmation" class="settings-links<?php echo ( $settings_accordion == 'confirmation' ) ? ' on' : ''; ?>">3. Confirmation<span class="arrow"></span></a>
1668
+ <div id="confirmation-message" class="form-details<?php echo ( $settings_accordion == 'confirmation' ) ? ' on' : ''; ?>">
1669
+ <p><em><?php _e( "After someone submits a form, you can control what is displayed. By default, it's a message but you can send them to another WordPress Page or a custom URL." , 'visual-form-builder'); ?></em></p>
1670
+ <label for="form-success-type-text" class="menu-name-label open-label">
1671
+ <input type="radio" value="text" id="form-success-type-text" class="form-success-type" name="form_success_type" <?php checked( $form_success_type, 'text' ); ?> />
1672
+ <span><?php _e( 'Text' , 'visual-form-builder'); ?></span>
1673
+ </label>
1674
+ <label for="form-success-type-page" class="menu-name-label open-label">
1675
+ <input type="radio" value="page" id="form-success-type-page" class="form-success-type" name="form_success_type" <?php checked( $form_success_type, 'page' ); ?>/>
1676
+ <span><?php _e( 'Page' , 'visual-form-builder'); ?></span>
1677
+ </label>
1678
+ <label for="form-success-type-redirect" class="menu-name-label open-label">
1679
+ <input type="radio" value="redirect" id="form-success-type-redirect" class="form-success-type" name="form_success_type" <?php checked( $form_success_type, 'redirect' ); ?>/>
1680
+ <span><?php _e( 'Redirect' , 'visual-form-builder'); ?></span>
1681
+ </label>
1682
  <br class="clear" />
1683
+ <p class="description description-wide">
1684
+ <?php
1685
+ /* If there's no text message, make sure there is something displayed by setting a default */
1686
+ if ( $form_success_message === '' )
1687
+ $default_text = sprintf( '<p id="form_success">%s</p>', __( 'Your form was successfully submitted. Thank you for contacting us.' , 'visual-form-builder') );
1688
+ ?>
1689
+ <textarea id="form-success-message-text" class="form-success-message<?php echo ( 'text' == $form_success_type ) ? ' active' : ''; ?>" name="form_success_message_text"><?php echo $default_text; ?><?php echo ( 'text' == $form_success_type ) ? $form_success_message : ''; ?></textarea>
1690
+
1691
+ <?php
1692
+ /* Display all Pages */
1693
+ wp_dropdown_pages( array(
1694
+ 'name' => 'form_success_message_page',
1695
+ 'id' => 'form-success-message-page',
1696
+ 'class' => 'widefat',
1697
+ 'show_option_none' => __( 'Select a Page' , 'visual-form-builder'),
1698
+ 'selected' => $form_success_message
1699
+ ));
1700
+ ?>
1701
+ <input type="text" value="<?php echo ( 'redirect' == $form_success_type ) ? $form_success_message : ''; ?>" id="form-success-message-redirect" class="form-success-message regular-text<?php echo ( 'redirect' == $form_success_type ) ? ' active' : ''; ?>" name="form_success_message_redirect" placeholder="http://" />
1702
+ </p>
1703
+ <br class="clear" />
1704
+
1705
  </div>
1706
+
1707
+ <!-- Notification section -->
1708
+ <a href="#notification" class="settings-links<?php echo ( $settings_accordion == 'notification' ) ? ' on' : ''; ?>">4. Notification<span class="arrow"></span></a>
1709
+ <div id="notification" class="form-details<?php echo ( $settings_accordion == 'notification' ) ? ' on' : ''; ?>">
1710
+ <p><em><?php _e( "When a user submits their entry, you can send a customizable notification email." , 'visual-form-builder'); ?></em></p>
1711
+ <label for="form-notification-setting">
1712
+ <input type="checkbox" value="1" id="form-notification-setting" class="form-notification" name="form_notification_setting" <?php checked( $form_notification_setting, '1' ); ?> style="margin-top:-1px;margin-left:0;"/>
1713
+ <?php _e( 'Send Confirmation Email to User' , 'visual-form-builder'); ?>
1714
+ </label>
1715
+ <br class="clear" />
1716
+ <div id="notification-email">
1717
+ <p class="description description-wide">
1718
+ <label for="form-notification-email-name">
1719
+ <?php _e( 'Sender Name or Company' , 'visual-form-builder'); ?>
1720
+ <span class="vfb-tooltip" title="About Sender Name or Company" rel="Enter the name you would like to use for the email notification.">(?)</span>
1721
+ <br />
1722
+ <input type="text" value="<?php echo $form_notification_email_name; ?>" class="widefat" id="form-notification-email-name" name="form_notification_email_name" />
1723
+ </label>
1724
+ </p>
1725
+ <br class="clear" />
1726
+ <p class="description description-wide">
1727
+ <label for="form-notification-email-from">
1728
+ <?php _e( 'Reply-To E-mail' , 'visual-form-builder'); ?>
1729
+ <span class="vfb-tooltip" title="About Reply-To Email" rel="Manually set the email address that users will reply to.">(?)</span>
1730
+ <br />
1731
+ <input type="text" value="<?php echo $form_notification_email_from; ?>" class="widefat" id="form-notification-email-from" name="form_notification_email_from" />
1732
+ </label>
1733
+ </p>
1734
+ <br class="clear" />
1735
+ <p class="description description-wide">
1736
+ <label for="form-notification-email">
1737
+ <?php _e( 'E-mail To' , 'visual-form-builder'); ?>
1738
+ <span class="vfb-tooltip" title="About E-mail To" rel="Select a required email field from your form to send the notification email to.">(?)</span>
1739
+ <br />
1740
+ <select name="form_notification_email" id="form-notification-email" class="widefat">
1741
+ <option value="" <?php selected( $form_notification_email, '' ); ?>><?php _e( 'Select a required email field' , 'visual-form-builder'); ?></option>
1742
+ <?php
1743
+ foreach( $emails as $email ) {
1744
+ echo '<option value="' . $email->field_id . '"' . selected( $form_notification_email, $email->field_id ) . '>' . $email->field_name . '</option>';
1745
+ }
1746
+ ?>
1747
+ </select>
1748
+ </label>
1749
+ </p>
1750
+ <br class="clear" />
1751
+ <p class="description description-wide">
1752
+ <label for="form-notification-subject">
1753
+ <?php _e( 'E-mail Subject' , 'visual-form-builder'); ?>
1754
+ <span class="vfb-tooltip" title="About E-mail Subject" rel="This option sets the subject of the email that is sent to the emails you have set in the E-mail To field.">(?)</span>
1755
+ <br />
1756
+ <input type="text" value="<?php echo $form_notification_subject; ?>" class="widefat" id="form-notification-subject" name="form_notification_subject" />
1757
+ </label>
1758
+ </p>
1759
+ <br class="clear" />
1760
+ <p class="description description-wide">
1761
+ <label for="form-notification-message"><?php _e( 'Message' , 'visual-form-builder'); ?></label>
1762
+ <span class="vfb-tooltip" title="About Message" rel="Insert a message to the user. This will be inserted into the beginning of the email body.">(?)</span>
1763
+ <br />
1764
+ <textarea id="form-notification-message" class="form-notification-message widefat" name="form_notification_message"><?php echo $form_notification_message; ?></textarea>
1765
+ </p>
1766
+ <br class="clear" />
1767
+ <label for="form-notification-entry">
1768
+ <input type="checkbox" value="1" id="form-notification-entry" class="form-notification" name="form_notification_entry" <?php checked( $form_notification_entry, '1' ); ?> style="margin-top:-1px;margin-left:0;"/>
1769
+ <?php _e( "Include a Copy of the User's Entry" , 'visual-form-builder'); ?>
1770
+ </label>
1771
+ </div>
1772
+ </div>
1773
  </div>
1774
  <?php endif; ?>
1775
+
1776
  <div class="publishing-action">
1777
  <input type="submit" value="<?php echo ( $action == 'create_form' ) ? __( 'Create Form' , 'visual-form-builder') : __( 'Save Form' , 'visual-form-builder'); ?>" class="button-primary menu-save" id="save_form" name="save_form" />
1778
  </div>
 
 
 
 
 
1779
  </div>
1780
  </div>
1781
  </div>
1814
  <p>Attention Visual Form Builder users! I am happy to announce <a href="http://vfb.matthewmuro.com">Visual Form Builder Pro</a>, available now for only <strong>$10</strong>.</p>
1815
  <h3><?php _e( 'New Features of Visual Form Builder Pro' , 'visual-form-builder'); ?></h3>
1816
  <ul>
1817
+ <li><?php _e( 'Drag and Drop to add new form fields' , 'visual-form-builder'); ?></li>
1818
+ <li><?php _e( '10 new Form Fields (Username, Password, Color Picker, Autocomplete, Hidden, and more)' , 'visual-form-builder'); ?></li>
1819
  <li><?php _e( 'Edit and Update Entries' , 'visual-form-builder'); ?></li>
1820
  <li><?php _e( 'Quality HTML Email Template' , 'visual-form-builder'); ?></li>
1821
+ <li><?php _e( 'Plain Text Email Option' , 'visual-form-builder'); ?></li>
1822
  <li><?php _e( 'Email Designer' , 'visual-form-builder'); ?></li>
1823
  <li><?php _e( 'Analytics' , 'visual-form-builder'); ?></li>
1824
  <li><?php _e( 'Data &amp; Form Migration' , 'visual-form-builder'); ?></li>
1949
  $verification = '';
1950
 
1951
  foreach ( $forms as $form ) :
1952
+ $label_alignment = ( $form->form_label_alignment !== '' ) ? " $form->form_label_alignment" : '';
1953
+ $output = '<form id="' . $form->form_key . '" class="visual-form-builder' . $label_alignment . '" method="post" enctype="multipart/form-data">
1954
  <input type="hidden" name="form_id" value="' . $form->form_id . '" />';
1955
  $output .= wp_nonce_field( 'visual-form-builder-nonce', '_wpnonce', false, false );
1956
 
2022
  $validation = ' {digits:true,maxlength:2,minlength:2}';
2023
  $verification .= '<li class="item item-' . $field->field_type . '"' . $logged_in_display . '><label for="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" class="desc">'. stripslashes( $field->field_name ) . $required_span . '</label>';
2024
 
2025
+ /* Set variable for testing if required is Yes/No */
2026
+ if ( $required == '' )
2027
+ $verification .= '<input type="hidden" name="_vfb-required-secret" value="0" />';
2028
+
2029
+ $verification .= '<input type="hidden" name="_vfb-secret" value="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" />';
2030
+
2031
  if ( !empty( $field->field_description ) )
2032
+ $verification .= '<span><input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="' . $logged_in_value . '" class="text ' . $field->field_size . $required . $validation . $css . '" /><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2033
  else
2034
  $verification .= '<input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="' . $logged_in_value . '" class="text ' . $field->field_size . $required . $validation . $css . '" />';
2035
  }
2046
  case 'phone' :
2047
 
2048
  if ( !empty( $field->field_description ) )
2049
+ $output .= '<span><input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text ' . $field->field_size . $required . $validation . $css . '" /><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2050
  else
2051
  $output .= '<input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text ' . $field->field_size . $required . $validation . $css . '" />';
2052
 
2055
  case 'textarea' :
2056
 
2057
  if ( !empty( $field->field_description ) )
2058
+ $output .= '<span><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2059
 
2060
  $output .= '<textarea name="vfb-'. esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-'. esc_html( $field->field_key ) . '-' . $field->field_id . '" class="textarea ' . $field->field_size . $required . $css . '"></textarea>';
2061
 
2063
 
2064
  case 'select' :
2065
  if ( !empty( $field->field_description ) )
2066
+ $output .= '<span><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2067
 
2068
  $output .= '<select name="vfb-'. esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-'. esc_html( $field->field_key ) . '-' . $field->field_id . '" class="select ' . $field->field_size . $required . $css . '">';
2069
 
2081
  case 'radio' :
2082
 
2083
  if ( !empty( $field->field_description ) )
2084
+ $output .= '<span><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2085
 
2086
  $options = ( is_array( unserialize( $field->field_options ) ) ) ? unserialize( $field->field_options ) : explode( ',', unserialize( $field->field_options ) );
2087
 
2102
  case 'checkbox' :
2103
 
2104
  if ( !empty( $field->field_description ) )
2105
+ $output .= '<span><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2106
 
2107
  $options = ( is_array( unserialize( $field->field_options ) ) ) ? unserialize( $field->field_options ) : explode( ',', unserialize( $field->field_options ) );
2108
 
2122
  case 'address' :
2123
 
2124
  if ( !empty( $field->field_description ) )
2125
+ $output .= '<span><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2126
 
2127
  $countries = array( "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "Colombi", "Comoros", "Congo (Brazzaville)", "Congo", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor (Timor Timur)", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepa", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States of America", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe" );
2128
  $output .= '<div>
2167
  case 'date' :
2168
 
2169
  if ( !empty( $field->field_description ) )
2170
+ $output .= '<span><input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text vfb-date-picker ' . $field->field_size . $required . $css . '" /><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2171
  else
2172
  $output .= '<input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text vfb-date-picker ' . $field->field_size . $required . $css . '" />';
2173
 
2175
 
2176
  case 'time' :
2177
  if ( !empty( $field->field_description ) )
2178
+ $output .= '<span><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2179
 
2180
  /* Get the time format (12 or 24) */
2181
  $time_format = str_replace( 'time-', '', $validation );
2210
  case 'html' :
2211
 
2212
  if ( !empty( $field->field_description ) )
2213
+ $output .= '<span><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
2214
 
2215
  $output .= '<script type="text/javascript">edToolbar("vfb-' . $field->field_key . '-' . $field->field_id . '");</script>';
2216
  $output .= '<textarea name="vfb-'. $field->field_key . '-' . $field->field_id . '" id="vfb-'. $field->field_key . '-' . $field->field_id . '" class="textarea vfbEditor ' . $field->field_size . $required . $css . '"></textarea>';
2238
 
2239
  case 'submit' :
2240
 
2241
+ $submit = stripslashes( $field->field_name );
2242
 
2243
  break;
2244
 
2297
  public function email() {
2298
  global $wpdb, $post;
2299
 
2300
+ $required = ( isset( $_REQUEST['_vfb-required-secret'] ) && $_REQUEST['_vfb-required-secret'] == '0' ) ? false : true;
2301
+ $secret_field = ( isset( $_REQUEST['_vfb-secret'] ) ) ? $_REQUEST['_vfb-secret'] : '';
2302
+
2303
+ /* If the verification is set to required, run validation check */
2304
+ if ( true == $required && !empty( $secret_field ) )
2305
+ if ( !is_numeric( $_REQUEST[ $secret_field ] ) && strlen( $_REQUEST[ $secret_field ] ) !== 2 )
2306
+ wp_die( __( 'Security check' , 'visual-form-builder') );
2307
+
2308
+ /* Test if it's a known SPAM bot */
2309
+ if ( $this->isBot() )
2310
+ wp_die( __( 'Security check' , 'visual-form-builder') );
2311
+
2312
+ /* Basic security check before moving any further */
2313
  if ( isset( $_REQUEST['visual-form-builder-submit'] ) && $_REQUEST['vfb-spam'] == '' ) :
2314
  $nonce = $_REQUEST['_wpnonce'];
2315
 
2383
  /* Build our forms as an object */
2384
  $fields = $wpdb->get_results( $query );
2385
 
2386
+ /* Setup counter for alt rows */
2387
+ $i = $points = 0;
2388
 
2389
  /* Prepare the beginning of the content */
2390
  $message = '<html><body><table rules="all" style="border-color: #666;" cellpadding="10">';
2396
  $value = $_FILES[ 'vfb-' . $field->field_key . '-' . $field->field_id ];
2397
 
2398
  if ( $value['size'] > 0 ) {
2399
+ /* 25MB is the max size allowed */
2400
+ $max_attach_size = 25 * 1048576;
2401
+
2402
+ /* Display error if file size has been exceeded */
2403
+ if ( $value['size'] > $max_attach_size )
2404
+ wp_die( __( 'File size exceeds 25MB. Most email providers will reject emails with attachments larger than 25MB. Please decrease the file size and try again.', 'visual-form-builder' ), '', array( 'back_link' => true ) );
2405
+
2406
  /* Options array for the wp_handle_upload function. 'test_form' => false */
2407
  $upload_overrides = array( 'test_form' => false );
2408
 
2414
 
2415
  /* If the wp_handle_upload call returned a local path for the image */
2416
  if ( isset( $uploaded_file['file'] ) ) {
2417
+ /* Retrieve the file type from the file name. Returns an array with extension and mime type */
2418
+ $wp_filetype = wp_check_filetype( basename( $uploaded_file['file'] ), null );
2419
+
2420
+ /* Return the current upload directory location */
2421
+ $wp_upload_dir = wp_upload_dir();
2422
+
2423
+ $media_upload = array(
2424
+ 'guid' => $wp_upload_dir['baseurl'] . _wp_relative_upload_path( $uploaded_file['file'] ),
2425
+ 'post_mime_type' => $wp_filetype['type'],
2426
+ 'post_title' => preg_replace( '/\.[^.]+$/', '', basename( $uploaded_file['file'] ) ),
2427
+ 'post_content' => '',
2428
+ 'post_status' => 'inherit'
2429
+ );
2430
+
2431
+ /* Insert attachment into Media Library and get attachment ID */
2432
+ $attach_id = wp_insert_attachment( $media_upload, $uploaded_file['file'] );
2433
+
2434
+ /* Include the file that runs wp_generate_attachment_metadata() */
2435
+ require_once( ABSPATH . 'wp-admin/includes/image.php' );
2436
+
2437
+ /* Setup attachment metadata */
2438
+ $attach_data = wp_generate_attachment_metadata( $attach_id, $uploaded_file['file'] );
2439
+
2440
+ /* Update the attachment metadata */
2441
+ wp_update_attachment_metadata( $attach_id, $attach_data );
2442
+
2443
  $attachments[ 'vfb-' . $field->field_key . '-' . $field->field_id ] = $uploaded_file['file'];
2444
 
2445
  $data[] = array(
2514
  else
2515
  $value = html_entity_decode( stripslashes( esc_html( $value ) ), ENT_QUOTES, 'UTF-8' );
2516
 
2517
+ /* Setup spam catcher RegEx */
2518
+ $exploits = '/(content-type|bcc:|cc:|document.cookie|onclick|onload|javascript|alert)/i';
2519
+ $profanity = '/(beastial|bestial|blowjob|clit|cock|cum|cunilingus|cunillingus|cunnilingus|cunt|ejaculate|fag|felatio|fellatio|fuck|fuk|fuks|gangbang|gangbanged|gangbangs|hotsex|jism|jiz|kock|kondum|kum|kunilingus|orgasim|orgasims|orgasm|orgasms|phonesex|phuk|phuq|porn|pussies|pussy|spunk|xxx)/i';
2520
+ $spamwords = '/(viagra|phentermine|tramadol|adipex|advai|alprazolam|ambien|ambian|amoxicillin|antivert|blackjack|backgammon|texas|holdem|poker|carisoprodol|ciara|ciprofloxacin|debt|dating|porn)/i';
2521
+
2522
+ /* Add up points for each spam hit */
2523
+ if ( preg_match( $exploits, $value ) )
2524
+ $points += 2;
2525
+ elseif ( preg_match( $profanity, $value ) )
2526
+ $points += 1;
2527
+ elseif ( preg_match( $spamwords, $value ) )
2528
+ $points += 1;
2529
+
2530
+ /* Validate input */
2531
+ $this->validate_input( $value, $field->field_type );
2532
+
2533
  //if ( $field->field_type !== 'submit' ) {
2534
  if ( !in_array( $field->field_type , array( 'verification', 'secret', 'submit' ) ) ) {
2535
  if ( $field->field_type == 'fieldset' )
2568
  $wpdb->insert( $this->entries_table_name, $entry );
2569
 
2570
  /* Close out the content */
2571
+ $message .= '<tr><td class="footer" height="61" align="left" valign="middle" colspan="2"><p style="font-size: 12px; font-weight: normal; margin: 0; line-height: 16px; padding: 0;">This email was built and sent using <a href="http://wordpress.org/extend/plugins/visual-form-builder/" style="font-size: 12px;">Visual Form Builder</a>.</p></td></tr></table></body></html>';
2572
 
2573
  /* Initialize header filter vars */
2574
  $this->header_from_name = stripslashes( $form_from_name );
2623
  endif;
2624
  }
2625
 
2626
+ /**
2627
+ * Validate the input
2628
+ *
2629
+ * @since 2.2
2630
+ */
2631
+ public function validate_input( $data, $type ) {
2632
+ if ( strlen( $data ) > 0 ) :
2633
+ switch( $type ) {
2634
+
2635
+ case 'email' :
2636
+ if ( !is_email( $data ) )
2637
+ wp_die( __( 'Not a valid email address', 'visual-form-builder' ), '', array( 'back_link' => true ) );
2638
+ break;
2639
+
2640
+ case 'number' :
2641
+ if ( !is_numeric( $data ) )
2642
+ wp_die( __( 'Not a valid number.', 'visual-form-builder' ), '', array( 'back_link' => true ) );
2643
+ break;
2644
+
2645
+ case 'digits' :
2646
+ if ( !is_int( $data ) )
2647
+ wp_die( __( 'Not a valid digit. Please enter a number without a decimal point.', 'visual-form-builder' ), '', array( 'back_link' => true ) );
2648
+ break;
2649
+
2650
+ case 'phone' :
2651
+ if ( strlen( $data ) > 9 && preg_match( '/^((\+)?[1-9]{1,2})?([-\s\.])?((\(\d{1,4}\))|\d{1,4})(([-\s\.])?[0-9]{1,12}){1,2}$/', $data ) )
2652
+ return true;
2653
+ else
2654
+ wp_die( __( 'Not a valid phone number. Most US/Canada and International formats accepted.', 'visual-form-builder' ), '', array( 'back_link' => true ) );
2655
+ break;
2656
+
2657
+ case 'url' :
2658
+ if ( !preg_match( '|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $data ) )
2659
+ wp_die( __( 'Not a valid URL.', 'visual-form-builder' ), '', array( 'back_link' => true ) );
2660
+ break;
2661
+
2662
+ default :
2663
+ return true;
2664
+ break;
2665
+ }
2666
+ endif;
2667
+ }
2668
+
2669
+ /**
2670
+ * Make sure the User Agent string is not a SPAM bot
2671
+ *
2672
+ * @since 1.3
2673
+ */
2674
+ public function isBot() {
2675
+ $bots = array( 'Indy', 'Blaiz', 'Java', 'libwww-perl', 'Python', 'OutfoxBot', 'User-Agent', 'PycURL', 'AlphaServer', 'T8Abot', 'Syntryx', 'WinHttp', 'WebBandit', 'nicebot');
2676
+
2677
+ $isBot = false;
2678
+
2679
+ foreach ( $bots as $bot ) {
2680
+ if ( strpos( $_SERVER['HTTP_USER_AGENT'], $bot ) !== false )
2681
+ $isBot = true;
2682
+ }
2683
+
2684
+ if ( empty($_SERVER['HTTP_USER_AGENT'] ) || $_SERVER['HTTP_USER_AGENT'] == ' ' )
2685
+ $isBot = true;
2686
+
2687
+ return $isBot;
2688
+ }
2689
+
2690
  /**
2691
  * Set the wp_mail_from_name
2692
  *