*

MB Themes

Re: Attached files in contact publisher form- Suggested fix
« Reply #15 on: October 10, 2022, 08:19:27 PM »
Giving into attention code tag (#) you can use for inserting code here.
This is part I was talking about:
Code: [Select]
<?php if(osc_item_attachment()) { echo 'enctype="multipart/form-data"'; };?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 305 posts
Re: Attached files in contact publisher form- Suggested fix
« Reply #16 on: October 11, 2022, 04:30:08 PM »
I didn't understand your last question, do I need to do something with the code you wrote?

(I did a test by putting the code here:

item-send-friend.php
..............................................
<!-- ITEM CONTACT FORM -->
    <form target="_top" action="<?php echo osc_base_url(true) ; ?>" method="post" name="contact_form" id="contact_form" <?php if(osc_item_attachment()) { echo 'enctype="multipart/form-data"'; };?> class="fw-box" style="display:block;">
      <input type="hidden" name="action" value="contact_post" />
      <input type="hidden" name="page" value="item" />
      <input type="hidden" name="id" value="<?php echo osc_item_id() ; ?>" />

but it didn't work)
« Last Edit: October 11, 2022, 04:32:12 PM by kriskoyk »

*

MB Themes

Re: Attached files in contact publisher form- Suggested fix
« Reply #17 on: October 11, 2022, 04:37:12 PM »
yes it's needed as form must have enctype="multipart/form-data" attribute to be able to transfer attachments.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 305 posts
Re: Attached files in contact publisher form- Suggested fix
« Reply #18 on: October 11, 2022, 04:58:46 PM »
It worked!!! I placed the code as you said and disabled the "Form submission without reloading" (Ajax) which was enabled until now and everything works fine. Thanks for your help and patience.
« Last Edit: October 11, 2022, 10:19:37 PM by kriskoyk »

*

MB Themes

Re: Attached files in contact publisher form- Suggested fix
« Reply #19 on: October 13, 2022, 05:32:07 PM »
Welcome.
Files cannot be submitted via ajax.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots