In SS4, I have a contact form and want to upload multiples files with this form. But now, userform addon doesn't support this purpose (I used File Upload Field). Could you give me any solution for my issue?.
Thank you,
Related
I have a form created by gravity forms which will allow the user to enter the data and upload two files (form has two input file fields - gravity forms provided file upload field). Once the user submit the page, I will save the data in to custom table with file path as one of the column inside the table.
But once form reloads, it will show the same form with already entered data, but don't know how to show the file link inside the form.
What I am trying to do is, I have to show the link with remove button if file already uploaded or show the file upload field again to allow user to upload the file again.
Could somebody help me please?
I guess when you will store the entered data on the custom table, store the file names as well.
Then have another function to check if the file is in the specified directory (ex. uploads).
This is a lazy solution, so keep an eye on your thread for a better one.
I am not using gravity forms file upload field as even sent mail with priority support asking for is there any hook to know when user clicked "X" button of uploaded file(this will be shown once user clicks on submit button after uploading the file), but they replied, they don't support customization and pointed to 3rd party developers.
So what I did is, removed file upload field and used html field, which I am showing manual file upload (html input type file) field if no file uploaded or showing the file link with remove button. This remove button handled via javascript which will update some hidden field and after submit I know user removed the file or not.
TL;DR: Can I upload hundreds of files via WordPress (vanilla or with free/premium plugins) which will appear on my website as downloadable files, or would another CMS be better suited to this task?
More info: I'm building a site to replace an old WordPress MU site. My (non-technical) client needs to be able to create a single profile page for each of their employees. Each employee page must include some or all of:
A header image
A text intro
A photo gallery
A list of links
Multiple audio embeds
Multiple video embeds
A list of ~1000 downloadable files, mostly pdf/jpg, divided into subgroups
Ideally the last point would be achieved something like this:
Client adds a custom field and must name it
Client drags any number (realistically 1-100) of files onto the field, or uploads via "add files" function
Files are saved in the backend to a folder named after the custom field
File order is editable by client
The field is output to the HTML page like this:
<h1>Custom Field Name</h1>
<ul>
<li><a>file1.pdf</a></li>
<li><a>file2.jpg</a></li>
...~100
</ul>
Employee A is totally separate from Employee B, C, etc. All employees' pages will be managed by a single user. Their files should exist separately in the backend. The paths to their files will ideally include their name, but only the filename itself needs to be printed to the page. A file system like this would be perfect:
/EmployeeFirstName-EmployeeLastName/Media/YYYY/Filename.xxx
I believe WP's default media file save directories can be customised via plugins.
I'm trying to do this in WP because it's what I've used in the past and it's what my client is familiar with. A friend recommended the Advanced Custom Fields plugin for WP, which I am looking into. I'm an experienced designer but a beginner developer. I accept my naïveté and I'm keen to learn.
Possible structures:
A single WP install with a Page per employee
A Multisite WP install with a Site per employee
Other?
After much searching I'm beginning to think WP might not be a suitable platform for long and busy pages (~80 video embeds per page, added via ACF) with this type of file management requirement. The admin page for my test page is already very slow to update and I haven't even started the file list part.
Since the key feature of this page template will be the ability to list hundreds of downloadable files, it seems logical to me to pick a CMS based on that requirement, rather than pick a familiar CMS and try to force it to do what I want.
Thanks for reading!
I have used
Download Attachments plugin which provide facilities to upload attachment as post meta from admin panel and user can download it from front end. Try it might help you.
I created a content type and there is a file upload field. The user uploads the file and submits the node. Then the file upload field will be available again, so the user can upload a new file.
How to implement this instead of you only see the file name and remove button?
Thank you!
If you want to upload multiple files in your file field, you should make sure that the field settings allow for it.
At Home » Administration » Structure » Content types » [Your content type] » Manage fields, you should edit your file field. Scroll down to the Field settings and set the Number of Values to Unlimited if that's what you want.
Solved! in _node_update and _node_insert delete the file field value from the database.
hey, im trying to do a multi file upload on my form, i used form api for that and drupal_render , but i cant find where i can do $form['uploadfield']=array(...multi files amount=3)
anyone has code to implment multi file upload in form api on d6?
Currently I do not think this is possible through the FAPI. See the discussions below:
http://drupal.org/node/452446
http://drupal.org/node/625958
There are some other options however. You can try using a Drupal module that implements this such as SWFUpload or Image FUpload (if you want to upload images).
SWFUpload can be used with CCK's Filefield and Image FUpload can be used with CCK's imagefield
EDIT: If your form is used for a custom content type, these articles/discussions should be helpful to you:
http://drupal.org/node/722268
http://drupal.org/node/702156
http://www.openbandlabs.com/blog/2009/06/programmatic-cck-content-type-creation
Using these methods, people have been able to add a CCK FileField to their custom content type.
I am building a WordPress website that will allow members to upload media such as videos, images, etc. They will do this on a public form at for example: domain.com/upload
The form will ask for a Title, a brief summary, show some categories to choose from, and finally a file uploader. The user will then be able to submit the form and it will appear on the site as a post but instead of being just text it is a piece of media.
I have created a custom post type and all seems to be fine, the problem I have is how to deal with the media upload, as the default WP method is to upload an item and then manually insert it into the post (and you can have as many inserted as you like). Where as I want users to be only able to upload one file per post and not have to insert the file into a post because the file itself is the post. They will also be able to upload a featured image.
Any ideas on how I can develop this? Thanks.
You could use WP upload methods to upload your file to the server. Then (depending on your upload's media type) you would insert HTML representation of the file into the post (e.g. parse a text file, create tag for image or embed a video).
If you want to see some working example, please let me know. I just outline the flow:
wp-handle_upload() to physically upload a file
wp_update_post() or wp_insert_post() depending on whether you're creating a new user post or editing existing one. Both methods require one argument - Post object. That's where you put your content (as a post_content field of course) and post data