{"id":39754,"date":"2015-11-03T13:50:59","date_gmt":"2015-11-03T13:50:59","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/forms-3rdparty-files\/"},"modified":"2018-10-10T04:01:20","modified_gmt":"2018-10-10T04:01:20","slug":"forms-3rdparty-files","status":"publish","type":"plugin","link":"https:\/\/scn.wordpress.org\/plugins\/forms-3rdparty-files\/","author":7795090,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.5.2","stable_tag":"trunk","tested":"4.9.29","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Forms: 3rd-Party File Attachments","header_author":"zaus, dominiceales","header_description":"","assets_banners_color":"","last_updated":"2018-10-10 04:01:20","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/drzaus.com\/donate","header_plugin_uri":"https:\/\/github.com\/zaus\/forms-3rdparty-files","header_author_uri":"http:\/\/drzaus.com","rating":0,"author_block_rating":0,"active_installs":20,"downloads":3023,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.4":"<ul>\n<li>breaking change for GF due to temp path handling, see <a href=\"https:\/\/github.com\/zaus\/forms-3rdparty-files\/issues\/1\">github #1<\/a><\/li>\n<\/ul>","0.3":"<ul>\n<li>changed base plugin class name and inheritance, removed registration hook<\/li>\n<\/ul>","0.2":"<ul>\n<li>&#039;overwrite&#039; setting no longer available; map name with the input field name and file attachment with <em>theinputfieldname_attach<\/em><\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2","0.3","0.5","0.5.2"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[5445,358,1152,361,1655],"plugin_category":[42,49,50],"plugin_contributors":[80258],"plugin_business_model":[],"class_list":["post-39754","plugin","type-plugin","status-publish","hentry","plugin_tags-cf7","plugin_tags-contact-form","plugin_tags-contact-form-7","plugin_tags-form","plugin_tags-gravity-forms","plugin_category-contact-forms","plugin_category-maps-and-location","plugin_category-media","plugin_contributors-zaus","plugin_committers-zaus"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/forms-3rdparty-files.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Exposes file upload\/attachments to the regular service mapping of <a href=\"http:\/\/wordpress.org\/plugins\/forms-3rdparty-integration\/\">Forms 3rdparty Integration<\/a>.<\/p>\n\n<p>From discussion at https:\/\/github.com\/zaus\/forms-3rdparty-integration\/issues\/40.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Unzip, upload plugin folder to your plugins directory (<code>\/wp-content\/plugins\/<\/code>)<\/li>\n<li>Make sure <a href=\"http:\/\/wordpress.org\/plugins\/forms-3rdparty-integration\/\">Forms 3rdparty Integration<\/a> is installed and settings have been saved at least once.<\/li>\n<li>Activate plugin<\/li>\n<li>Choose how the files will be attached -- either:\n\n<ul>\n<li>as server path<\/li>\n<li>as url<\/li>\n<li>as base64-encoded bytes<\/li>\n<li>as raw contents<\/li>\n<\/ul><\/li>\n<li>Map to the desired file detail, where <em>\"[field]\"<\/em> is the corresponding input field name as you would normally map:\n\n<ul>\n<li><code>[field]<\/code> -- the filename<\/li>\n<li><code>[field]_attach<\/code> -- the transformed attachment from the previous step<\/li>\n<li><code>[field]_mime<\/code> -- the file's actual mime-type<\/li>\n<li><code>[field]_size<\/code> -- the file size<\/li>\n<\/ul><\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How do I perform the appropriate transforms in custom hooks<\/dt>\n<dd><p>Using <code>F3i_Files_Base::Transform($value, $how)<\/code> where <code>$how<\/code> is:\n* <code>path<\/code>\n* <code>url<\/code>\n* <code>base64<\/code>\n* <code>raw<\/code><\/p><\/dd>\n<dt>Gravity Forms input ids cause conflicts<\/dt>\n<dd><p>Use the 'label' option to instead reference file uploads via the field label.  You can also set the Advanced &gt; Admin Field Label to use a shorter\/non-display label than what users see on the form.<\/p>\n\n<p>ex) If your upload field <code>input_5<\/code> has a very long label \"Choose one or more files blah blah blah\" you would reference details like <code>Choose one or more files blah blah blah_attach<\/code> unless you set an admin label like \"FileUpload\", in which case you'd map to <code>FileUpload_attach<\/code>.  You can also use this to attach to different upload fields across forms -- normally they might not be able to share the input_id, but if you give them the same admin field label then you only need to map the service once to that admin label.<\/p><\/dd>\n<dt>This only works for GF or CF7, what about Ninja Forms or some other form plugin?<\/dt>\n<dd><p>Message the author about adding it, or:\n1. extend <code>F3i_Files_Base<\/code> and declare a method <code>get_files<\/code> that returns an array of (input_field =&gt; filepath)\n2. hook to <code>F3i_Files_Base_register<\/code> and declare a new instance of your class<\/p>\n\n<p><em>(A note about Ninja Forms -- file uploads are a paid addon, and the author doesn't have a copy, so adding it wasn't on the roadmap)<\/em><\/p><\/dd>\n<dt>It doesn't work right...<\/dt>\n<dd><p>Drop an issue at https:\/\/github.com\/zaus\/forms-3rdparty-files<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.5.2<\/h4>\n\n<ul>\n<li>added special GF option to use field labels<\/li>\n<li>some under-the-hood refactoring for clarity, reuse<\/li>\n<\/ul>\n\n<h4>0.5<\/h4>\n\n<ul>\n<li>refactored support for GF single and multifile fields<\/li>\n<li>fix: collapsing ui<\/li>\n<\/ul>\n\n<h4>0.4.1<\/h4>\n\n<ul>\n<li>fix #2 -- GF validation errors removes filename, fallback to path basename<\/li>\n<\/ul>\n\n<h4>0.4<\/h4>\n\n<ul>\n<li>including <code>$form<\/code> in <code>_get_files<\/code> hook<\/li>\n<li>consolidating byte handling between 'raw' and 'base64'<\/li>\n<li>no longer throws an exception if unable to get file, instead returns an error array<\/li>\n<li>fixed for GF 2.0.7.2 temp path issue #1<\/li>\n<li>new filter: <code>_get_path<\/code> used for GF bug<\/li>\n<\/ul>\n\n<h4>0.3<\/h4>\n\n<ul>\n<li>refactored inheritance, 'better' form registration, include ninja forms<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>added \"meta\" details<\/li>\n<li>breaking change - removed overwrite setting as unnecessary (due to compatible formatting)<\/li>\n<li>works with GF and CF7<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<p>IT HAS BEGUN<\/p>","raw_excerpt":"Add file upload processing to Forms 3rdparty Integration.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/39754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=39754"}],"author":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/zaus"}],"wp:attachment":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=39754"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=39754"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=39754"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=39754"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=39754"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=39754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}