{"id":45128,"date":"2009-09-29T17:01:19","date_gmt":"2009-09-29T17:01:19","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/forms\/"},"modified":"2010-04-01T23:17:29","modified_gmt":"2010-04-01T23:17:29","slug":"forms","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/forms\/","author":186678,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.4 (beta11)","stable_tag":"trunk","tested":"2.9.2","requires":"2.7","requires_php":"","requires_plugins":"","header_name":"Forms","header_author":"Weston Ruter","header_description":"","assets_banners_color":"","last_updated":"2010-04-01 23:17:29","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/forms\/","header_author_uri":"http:\/\/weston.ruter.net\/","rating":0,"author_block_rating":0,"active_installs":100,"downloads":10453,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.9"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[601,2906,724,2490],"plugin_category":[42],"plugin_contributors":[78438],"plugin_business_model":[],"class_list":["post-45128","plugin","type-plugin","status-closed","hentry","plugin_tags-forms","plugin_tags-input","plugin_tags-validation","plugin_tags-web-forms","plugin_category-contact-forms","plugin_contributors-westonruter","plugin_committers-westonruter"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/forms.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><em>This plugin is developed at\n<a href=\"http:\/\/www.shepherd-interactive.com\/\" title=\"Shepherd Interactive specializes in web design and development in Portland, Oregon\">Shepherd Interactive<\/a>\nfor the benefit of the community. No support is available. Please post any questions to the <a href=\"http:\/\/wordpress.org\/tags\/forms?forum_id=10\">support forum<\/a>.<\/em><\/p>\n\n<p>Allows forms to be written with new HTML5 input type and validation attributes, and\nthen to have them validate themselves server-side: DRY forms (don't repeat yourself).\nForms are embedded into posts via the <code>form<\/code> shortcode. Results can be automatically emailed.\nA web form is defined in a PHP function that returns an entire form element, for example:<\/p>\n\n<pre><code>function my_contact_form($attrs, $content = null){\n    ob_start();\n    ?&gt;\n    &lt;form method=\"post\"&gt;\n        &lt;p hidden=\"hidden\" class=\"form_error_message\"&gt;&lt;\/p&gt;\n        &lt;p&gt;Name: &lt;input type=\"text\" required=\"required\" name=\"contact_name\" maxlength=\"255\" placeholder=\"Jo Smith\" autofocus=\"autofocus\" \/&gt;&lt;\/p&gt;\n        &lt;p&gt;Email: &lt;input type=\"email\" required=\"required\" name=\"contact_email\" maxlength=\"255\" placeholder=\"jsmith@example.com\" \/&gt;&lt;\/p&gt;\n        &lt;p&gt;Message: &lt;textarea required=\"required\" name=\"contact_message\" maxlength=\"1000\" placeholder=\"Enter your message here\"&gt;&lt;\/textarea&gt;&lt;\/p&gt;\n        &lt;p&gt;&lt;button type=\"submit\"&gt;Submit&lt;\/button&gt;&lt;\/p&gt;\n    &lt;\/form&gt;\n    &lt;?php\n    $ret = ob_get_contents();\n    ob_end_clean();\n    return $ret;\n}\n<\/code><\/pre>\n\n<p>And this form can be embedded into a post by entering <code>[form name=\"my_contact_form\"]<\/code>.\nHere are the shortcode options:<\/p>\n\n<ul>\n<li><code>name<\/code><\/li>\n<li><code>email_to<\/code><\/li>\n<li><code>email_cc<\/code><\/li>\n<li><code>email_bcc<\/code><\/li>\n<li><code>email_subject<\/code><\/li>\n<li><code>success_url<\/code><\/li>\n<li><code>success_page_id<\/code><\/li>\n<li><code>cc_sender<\/code> default: <code>false<\/code><\/li>\n<li><code>email_type<\/code> default: (HTML) <code>table<\/code>: other options <code>dl<\/code>, <code>text<\/code>, <code>form<\/code><\/li>\n<\/ul>\n\n<p>These options may also be specified via Custom Fields (postmeta):<\/p>\n\n<ul>\n<li><code>form_name<\/code><\/li>\n<li><code>form_email_to<\/code><\/li>\n<li><code>form_email_cc<\/code><\/li>\n<li><code>form_email_bcc<\/code><\/li>\n<li><code>form_email_subject<\/code><\/li>\n<li><code>form_success_page_id<\/code><\/li>\n<li><code>form_success_url<\/code><\/li>\n<li><code>form_email_type<\/code><\/li>\n<\/ul>\n\n<p>Many filters and actions are available. Please see the source code.<\/p>\n\n<p>When the form is submitted and the server determines that user data is invalid, then the server will respond with 400 Invalid Request.\nIn the 400 response, the page containing the form is returned and the form repopulated with the user's original request with\nclass names and <code>data-<\/code> attributes that describe the errors on an invalid element.<\/p>\n\n<p>If the server successfully validates the form, then the user will be redirected to <code>success_url<\/code> or <code>success_page_id<\/code> if they are provided.<\/p>\n\n<p>Please see source code for full documentation.<\/p>\n\n<h4>Handling File Inputs<\/h4>\n\n<p>Files are uploaded to <code>\/wp-content\/uploads\/<\/code> (or whatever this is specified to\nbe in your install), unless filtered to be something different via\n    form_file_upload_path filter, or if the <code>data-upload-path<\/code> attribute is set on\nthe <code>file input<\/code> element, for example:<\/p>\n\n<pre><code>&lt;input type=\"file\" data-upload-path=\"&lt;?php\n        $uploadDir = wp_upload_dir();\n        echo esc_attr(parse_url(trailingslashit($uploadDir['baseurl']) . 'form-submissions\/', PHP_URL_PATH));\n?&gt;\" name=\"my_image\" pattern=\".+\\.(jpe?g|gif|png)\" \/&gt;\n<\/code><\/pre>\n\n<p>The upload path is appended to the <code>ABSPATH<\/code>,\nand it must be within the <code>\/wp-content\/uploads\/<\/code> directory (or\nequivalent) or a security exception will be raised. When the server fails to\nmove the file or if it is too big or if some other error occurs (e.g. directory\nnot writable), then the form submission will respond with a 500 error and the\nfile control will be marked as <code>invalid customError<\/code> and the specific\nerror will be included on the <code>data-validationMessage<\/code> attribute.<\/p>\n\n<!--section=changelog-->\n<h4>2010-04-01: 0.4 (beta11)<\/h4>\n\n<ul>\n<li>Adding <code>form_abort_on_email_failure<\/code> filter so that emails don't have to abort success<\/li>\n<li>Added <code>form_complete<\/code> and <code>form_error<\/code> actions.<\/li>\n<\/ul>\n\n<h4>2010-01-22: 0.4 (beta10)<\/h4>\n\n<ul>\n<li>Fixing email_cc<\/li>\n<\/ul>\n\n<h4>2009-11-04: 0.4 (beta6)<\/h4>\n\n<ul>\n<li>Adding filters for plain text emails generated.<\/li>\n<li>Adding option\/shortcode param <code>(form_)email_include_empty_fields<\/code> to force empty fields to be included in emails.<\/li>\n<\/ul>\n\n<h4>2009-10-29: 0.4 (beta5)<\/h4>\n\n<ul>\n<li>Adding <code>min<\/code> and <code>max<\/code> checks to number form inputs.<\/li>\n<\/ul>\n\n<h4>2009-10-15: 0.4 (beta2)<\/h4>\n\n<ul>\n<li>Adding <code>add_filter('form_email_message', 'wp_filter_post_kses')<\/code> and some other email sanitation checks, just in case.<\/li>\n<li>Now doing <code>stripslashes()<\/code> on request params regardless of <code>get_magic_quotes_gpc()<\/code> or <code>get_magic_quotes_runtime()<\/code> (WordPress always escapes the global request params in wp-settings.php)<\/li>\n<\/ul>\n\n<h4>2009-10-06: 0.4 (beta)<\/h4>\n\n<ul>\n<li>Non-empty HTML elements are ensured to not get serialized with XML shorthand\nempty syntax (space now not required in <code>p<\/code>)<\/li>\n<li>Handling of <code>file<\/code> input types. <\/li>\n<li>The <code>data-email-label<\/code> attribute can now be supplied on the\n  input element, not just the <code>label<\/code> element.<\/li>\n<li>Stubbed validation for <code>url<\/code>, <code>number<\/code>, and\n  range types<\/li>\n<li>Multiple forms are now allowed on a single page. A <code>hidden<\/code> field\nnamed '_form_name_submitted' captures the name of the form that is submitted so the\nserver can match up the request with the corresponding form.<\/li>\n<\/ul>\n\n<h4>2009-09-29: 0.3.9<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"DRY forms (don&#039;t repeat yourself) which validate themselves server-side. Form results can be emailed. Hooks and options make plugin very flexible &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/45128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=45128"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/westonruter"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=45128"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=45128"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=45128"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=45128"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=45128"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=45128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}