ouun / zammad-wp

Zammad WordPress integration
GNU General Public License v2.0
27 stars 5 forks source link

Form with custom attributes HTML Forms by lbericod and binary attachments (photos, pdf, etc.). #35

Closed pawelmendela closed 1 year ago

pawelmendela commented 1 year ago

Hi, I am creating a form with custom attributes for submissions using HTML Forms by Ibericode. Everything works perfectly. However, I have not found the ability to send an attachment from the form to a newly created submission. This is necessary because the form is supposed to handle claim submissions, the customer must be able to attach a photo of the claimed item. Is there any chance to help with the implementation of this task ?

Best regards Pawel

ouun commented 1 year ago

Hi @pawelmendela,

just looked at that and there was simply no logic to map & attach the HTML Forms uploads to the created ticket, yet. So I took some hours to get back to the code and to add that functionality. I agree it should be there. So please feel free to test v0.9.0.

I will close the ticket for now but please let me know if it works as expected. There is a limitation that HTML Forms Plugin can't handle fields with multiple files. So if you need multiple uploads, you will need multipe fields: https://github.com/ibericode/html-forms/issues/53

And if you want to support the ongoing updates in this, please feel free to do so.

Kind regards,

Philipp

zappulec commented 1 year ago

Hi @ouun Thank you very much for your commitment and the work you have done. I did upgrade the plugin to v.0.9.0 but I'm not sure if I'm trying to use it correctly.

Can you describe how to use the "upload" section of this plugin?

Thank you Paweł

zammad-wp2 zammad-wp1

ouun commented 1 year ago

@zappulec, @pawelmendela that should work with your field as in your screenshot. The plug-in recognises the file and adds it as attachment to the Zammad ticket. Can you try it with a PDF or image file?

zappulec commented 1 year ago

However, this is not happening, I tried to attach both pdf and jpg to the ticket, the effect is the same.

zammad-wp3

Could the reason be the change I made in the platform_check.php file to run the plugin on an older version of PHP 7.4.3-4ubuntu2.16 that I have on the server ? zammad-wp4

ouun commented 1 year ago

@zappulec, @pawelmendela just realized that the integration only works with the premium version of HTML Forms activated: https://www.htmlformsplugin.com/premium-features/ However I added support for the non-premium version with v0.9.1. Can you please test again?

Thanks.

pawelmendela commented 1 year ago

Hi @ouun Thank you for your help. I will of course check it in a few hours when I get home. I will describe the test results in my next message.

zappulec commented 1 year ago

@ouun I upgraded zammad-wp to the latest version 0.9.1 and then ran tests. Now uploading attached files (pdf, png, jpg) works fine. Once again, I would like to thank you for the time you took to solve this problem. I will try to support the development of the project in the near future.

Best regards Pawel

ouun commented 1 year ago

@zappulec, @pawelmendela glad it works now as expected.