• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Any Cold Fusion gurus here?

Thraxen

Diamond Member
I posted this before the forum layout change in the tech support forum and didn't get any responses. Anyway, if anyone here is good with CF please let me know and I'll either post the code here or send it via PM. It should be a fairly simply task, I'm just completely new to CF and not sure what I'm doing.

Thanks!
 
Thanks guys...

OK, I'm very new to CF, so I hope this all makes sense. I work for a small company (maybe 100 users) and I'm trying to set-up form where people can submit change requests for our QA documents.

Someone else created the initial form where users can submit the requests and our document control person can then view table in their web browser and see the requests. It works like a simple held desk ticket system. This all works.

What they want me to add is a way to submit files at the same time. This way, users can edit the file(s) in question with their suggested changes for the document control manager to look over.

So, first off, here's the code for the submission page:

[edit] Damn.. I can't seem to get it added correctly. The formatting fubars every time. I'm just going to include the forms in a zip at the end of my post.

Anyway, in the zip is a submission form as described above. This form calls a second form that generates a "Thanks for your submission" page and sends an e-mail to the document control manager notifying them of the request. I've also included this form. The final form is a basic CF upload form.

What I want to do is combine the current submission form with the upload form so that a document can be uploaded to a network directory at the same time the change request is submitted (with a single 'submit'). This way users can edit the document in question and submit their suggested revision. The "thanks" form can remain separate or combined, that's not my main concern since it works as is.

The table where this information is stored already has an unused field named 'docs' where I'd like the location of the uploaded file to be stored (the path). I believe that field was added for this reason at some point, but hasn't been used so far.

Here are the files: cf forms
 
Rather than give you a fish, I'll give you a pole.

On your main submission page you need to add a field with a browse button for locating the file on the local machine.

<INPUT NAME="userfile" TYPE="file" SIZE="25">

That will give you the text box and browse button.

Once you have added that to the main page, on the submitqmsupdate.cfm page you will need to transfer over your upload code from the cf_upload.cfm page.

<cffile action="upload" filefield="ul_path" destination="c:\inetpub\wwwroot\qaadev\uploads\" nameconflict="makeunique">

That is the code you will need to move over. You will need to modify it according to the name value you define on the browse file form item.

Once you do that, you can retrieve the file name by using the CF Function, #cffile.serverFile#.

Hopefully this will get you pointed in the right direction. If you have any questions based on that, feel free to ask away.

 
Back
Top