Jquery function multiple upload fields add indivdually

百般思念 提交于 2019-12-13 03:47:53

问题


I have a contact form that I have set up using contact form 7 for wordpress. What I would like to know is if there is a function that when the user clicks on an add button a new file upload option appears so they can have a maximum of 5 file upload fields but 1 shows initially and then they add another one as they need it.

I found this: http://kg69design.com/multiple-files-uploading-cf7.html but I can't seem to get it to work

any help would be appreciated.

thanks


回答1:


  1. Go to the plugin and select contact 7 from plugin.
  2. Go to the modules folder.
  3. Find the file.php and open it in any editor.
  4. Copy and paste the below code snippet in line number 45.
  5. Multiple file select and upload in now available in your contact form.

$atts['multiple'] = true;




回答2:


Go to the plugin and select contact 7 from plugin. Go to the modules folder. Find the file.php and open it in any editor. Copy and paste the below code snippet in line number 45. Multiple file select and upload in now available in your contact form.

This solution does not work. It gives an option for the user to pick multiple files, but when the e-mail arrives you only get one file attached...




回答3:


I used my theme's "add code to the head" section to inject the code from the website and it started working perfectly.

To answer duplicate_content's question, you need to ensure you have space between the file shortcodes in the file attachments section of CF7. Mail tab section of CF7



来源:https://stackoverflow.com/questions/26933895/jquery-function-multiple-upload-fields-add-indivdually

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!