File Upload - 90% there - need help please - updated
Posted: 12 September 2007 01:01 PM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  37
Joined  2006-12-07

Greetings from Florida....
I’m integrating the file upload 2.1 into a Stand Alone Entry Form with EE 2.1.

I manage to upload the file to the server ( I can see it via FTP) but the file does not get inserted in the desigated custom field and is not getting attached to the entry.

I’m trying to insert the uploaded file address in the custom field “services_logo”, which is a textarea, so I can display it later in the entry.

After I upload the file, the pop-up SOURCE shows garbage like this:
<input type=’submit’ value=’Place Image and Close Window’ onclick=’fileplacer();window.close();’ />

Here are the pieces....

1. SAEF - just showing the file upload part.....

{!-- ///////////////////////////// Form to insert new listing //////////////////////// --}
<h2 class="coltop">Directory Submit Form</h2>
<div class="article">

{exp:weblog:entry_form weblog="services" return="services/index" preview="services/submit_company" use_live_url="no" show_fields="not services_logo"}

........

{!-- ///////////// File upload for an image or screen shot ////////////// --}
Upload your logo or a screen shot to be included on your page

see attached image BELOW I have inserted the code here 20 times and it will not display

<input type="submit" name="submit" value="Submit" />
<input type="submit" name="preview" value="Preview" />

{/exp:weblog:entry_form}

</div><!-- /article -->

{!-- //////////////////////////////// End of Form /////////////////////// --}

2. file_upload - I’ve tried both “entryform” and “entry_form”, which is what it is called in 1.6 - same result..

Upload a logo or screen shot to be included in your dedicated listing page (optional)

{exp:file_upload:upload_form form_name="entry_form" destination="Main Upload Directory" field_name="services_logo" return="services/file_upload_select" rename_duplicates="yes"}
<input type='file' name='userfile' />
<
input type='submit' value='Upload File' />
{/exp:file_upload:upload_form}

3. file_upload_select
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Upload File</title>
{javascript}
</head>
<body>

{exp:file_upload:upload_confirm field_replace="replace"
<input type=’submit’ value=’Place Image and Close Window’ onclick=’fileplacer();window.close();’ /> 
{/exp:file_upload:upload_confirm}

</body>
</html>

Image Attachments
file_upload.gif
Profile
 
 
Posted: 13 September 2007 07:13 PM   [ Ignore ]   [ # 1 ]
Jr. Member
RankRank
Total Posts:  37
Joined  2006-12-07

Problem Solved…

This is a heads up because I noticed someone else had the same issue in an earlier thread - I read them all about 20x..

If you copy and paste the code in the documentation, the code block for File Placement has the wrong quotes around ‘fileplacer........’ in this block of text:

{exp:file_upload:upload_confirm field_replace="replace"
<input type='submit' value='Close Window' onclick='fileplacer();window.close();' /> 
{/exp:file_upload:upload_confirm}

I deleted the quotes around it, changed them to standard single quotes and all worked - viola.

I am on a Mac (OSX) - not sure if that matters.

Profile
 
 
Posted: 13 September 2007 10:16 PM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

netbuilder,

Thanks for posting this. I appreciate it.

mk

 Signature 

Mitchell Kimbrough

Profile