Title: Integration with forms
Last modified: August 22, 2016

---

# Integration with forms

 *  [Luke Mackenzie](https://wordpress.org/support/users/lukemack/)
 * (@lukemack)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/integration-with-forms/)
 * Is there a way to integrate this plugin with a form so that the image URL is 
   sent with the form? I’m working on a site on which the original developer had
   simply added some HTML to a form with the uploadcare shortcode so the uploader
   was not actually part of the form and not associated with a field.
 * A programmatic solution would be fine.
 * [https://wordpress.org/plugins/uploadcare/](https://wordpress.org/plugins/uploadcare/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [david-uploadcare](https://wordpress.org/support/users/david-uploadcare/)
 * (@david-uploadcare)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/integration-with-forms/#post-5570986)
 * Hi Luke,
 * For any custom forms, no matter what form builder is used, there is one uniform
   recipe how to bind Uploadcare widget to it easily:
    - Add a normal field to your form to handle image URL. It’s preferred if you
      can add a field with `type="hidden"`, but not necessary
    - Include Uploadcare library and public key (see [widget config snippets](https://uploadcare.com/widget/configure/))
    - Add a code snippet that would convert the field to Uploadcare widget, and 
      add some settings to it (see [JavaScript API](https://uploadcare.com/documentation/javascript_api/#widget)
      and [Widget configuration](https://uploadcare.com/documentation/widget/#configuration)
      for more info):
 *     ```
       <script>
           uploadcare.jQuery(function() {
               var field = uploadcare.jQuery('#your-field-id')
               field.data('images-only', true);
               field.data('preview-step', true);
               uploadcare.Widget(field);
           });
       </script>
       ```
   
    - If the field is not hidden, you may need to make it hidden, so add one more
      line to the code above: `uploadcare.jQuery('#your-field-id').attr('type', '
      hidden');`
 *  Thread Starter [Luke Mackenzie](https://wordpress.org/support/users/lukemack/)
 * (@lukemack)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/integration-with-forms/#post-5570990)
 * Thanks for the speedy response :). Is the above snippet to be used instead of
   the shortcode provided by the plugin? Can the above parameters be added to the
   shortcode?
 *  [david-uploadcare](https://wordpress.org/support/users/david-uploadcare/)
 * (@david-uploadcare)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/integration-with-forms/#post-5570999)
 * You can definitely exlude `shortcode.js` from your page, as it is not needed 
   in this case.
 * Also you should remove `<input class="uploadcare-uploader"... >` from your page,
   and add the code snippet I’ve provided.
 *  Thread Starter [Luke Mackenzie](https://wordpress.org/support/users/lukemack/)
 * (@lukemack)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/integration-with-forms/#post-5571000)
 * Thanks but I am talking about a wordpress shortcode, I am not manually adding
   any javascript files, the shortcode is presumably triggering their inclusion 
   via the plugin (same goes for the <input … markup.
 *  Plugin Author [Dmitry Mukhin](https://wordpress.org/support/users/dmitry-mukhin/)
 * (@dmitry-mukhin)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/integration-with-forms/#post-5571044)
 * Luke, we’ll add attributes to shortcut to make it more flexible. But the quickest
   way for you is to add widget code and treat your WP form just like an ordinary
   HTML form.
 *  [david-uploadcare](https://wordpress.org/support/users/david-uploadcare/)
 * (@david-uploadcare)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/integration-with-forms/#post-5571070)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Integration with forms’ is closed to new replies.

 * ![](https://ps.w.org/uploadcare/assets/icon.svg?rev=2835052)
 * [Uploadcare File Uploader and Adaptive Delivery (beta)](https://wordpress.org/plugins/uploadcare/)
 * [Support Threads](https://wordpress.org/support/plugin/uploadcare/)
 * [Active Topics](https://wordpress.org/support/plugin/uploadcare/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/uploadcare/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/uploadcare/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [david-uploadcare](https://wordpress.org/support/users/david-uploadcare/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/integration-with-forms/#post-5571070)
 * Status: not resolved