david-uploadcare
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
You can definitely exlude
shortcode.jsfrom 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.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)
- Add a code snippet that would convert the field to Uploadcare widget, and add some settings to it (see JavaScript API and 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');
- Add a normal field to your form to handle image URL. It’s preferred if you can add a field with
Viewing 3 replies - 1 through 3 (of 3 total)