Skip Navigation

[Resolved] Using an Image Editor to upload and edit images for images fields

This support ticket is created 4 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Luo Yang 4 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#1896821
screenshot-sewcialista.com-2021.01.07-10_21_50.png

Hi

Im trying to integrate pixoeditor (hidden link) with toolset post form i created. I need to be able to upload images through images field (toolset field) and be able to edit the image in Pixoeditor, then save and publish the form.

Frontend post form > Image field > User uploads image using Image field > after upload, opens the image editor > user edits the image > save > user publish the form > image will display on front end

Does this make sense?
can you help me to achieve this goal?

#1896897

Hello,

Toolset Forms plugin supports WordPress Native Media Manager, see our document:
https://toolset.com/course-lesson/using-the-native-wordpress-media-manager-in-front-end-forms/


This allows logged-in users to select multiple items into repeating fields at once. They can also edit images as they are adding them.

#1896945

Thank you for the link. i was actually looking for another option as wordpress native editor is pretty basic. Is it possible to integrate such service with toolset?

#1898135

Unfortunately, there isn't such kind of built-in feature within Toolset plugins, you can add a feature request for it, our developers will evaluate it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

#1898757

Hi Again

thank you for letting me know. i contacted the plugin vendor and they gave me this link. do you think this API can work with toolset?
hidden link

thank you for your support

#1900699

I think there is a misunderstanding, as I mentioned above, Toolset Forms plugin supports WordPress Native Media Manager, that means if other plugin (pixoeditor ) can be integrated into WordPress Native Media Manager, then you will be able to use it in Toolset Forms plugin.

I suggest you check it with plugin author of pixoeditor, check if they can integrate pixoeditor into WordPress Native Media Manager.

#1907961

HI Again

i found this article and i tried to change it to match with toolset. : hidden link

I got it working on front end but however even the editor opens up when i upload an image, it does not save to media library. can you please help me to change the code to be able to save to media library?

** when i change input type to "image" it does not work. but the field is image field. but it works when change back to "file"

 <script src="<em><u>hidden link</u></em>"></script>
				<script>

   window.onload = function () {

      var input = document.querySelector('input[type=file]');

      if (input) {

         input.onchange = function () {

            if (!input.files.length) {

               return; }

            var editor = new Pixo.Bridge({

               apikey: '1acrk2pmfum8',

               type: 'modal',

               theme: 'wordpress',

               onSave: function (image) {

                  var hidden = input.form

                     .querySelector('input[type=hidden][name=edited-file]');

                  if (hidden) {

                     hidden.value = image.wp_save_image_file();

                     // clean up the file input so we do not submit the source file

                     input.value = ''; }}

    });

            editor.edit(input.files[0]);

         } } }

</script>

Thank you for your support

#1908611

According to our support policy:
https://toolset.com/toolset-support-policy/
We don't provide custom codes support, you can check it with Toolset certified consultants:
https://toolset.com/contractors/