Attaching pictures to forms

H

harleyridin

i am placing a form in my website with Publisher. How can I allow my users
to attach pictures to my forms. Everything I have tried has failed.
 
M

Mike Koewler

Place the following in an HTML code fragment:
<input type="file" id="file_1" name="file_1" size="14">

Make sure it is between the <form> and </form> tags.

Mike
 
H

harleyridin

Thank you Mike. Works like a champ. I can now upload my web site and get
down to business. Really appreciate it.
 
H

harleyridin

Mike,

Having a problem with the form. The code allows me to browse my computer
and select pictures and it looks like it attaches them. The only problem is
that when I receive the form with the attachments, I get the dir & file name
of the picture being sent. Not the picture. How can I get the picture
 
M

Mike Koewler

Harley,

Talk about a real PITA - not you, but Pub. It's a real simple problem,
Pub needs the form to read something like <form action=> part to include
enctype="multipart/form-data"
The problem is getting Pub to do it, at least for me. If I simply add it
to the part where the action line is, Pub wants to convert it. What I
ended up doing was creating a form the old fashioned way, using an HTML
code fragment.

Perhaps David or Rob knows how to add the enctype="multipart/form-data"
part in the action line.

Mike
 
D

DavidF

It will have to be Rob, as this kid doesn't know the answer. Until you
posted this little snippet the last time this subject came up, I had always
worked under the assumption that the Publisher forms were limited to the
form objects built into the program.

The OP might look to his webhost for an alternative form program. Most offer
some sort of form program that is much easier to customize than the
Publisher one.

Sorry I can't be of more help.

Oh...and the OP could just have people email them to him...or use a service
such as www.yousendit.com .

DavidF
 
M

Mike Koewler

David,

If the OP wants to use something like Notepad to edit the source code,
it would be a piece of cake. <form
action="whatever_script_Pub_generates.com" method="post"
enctype="multipart/form-data">

I tried it using hidden fields also, but it didn't work.

Sudden thought - there is something called an "escape code" that tells
browsers to ignore certain spaces and stuff. It is &nbsp; and that might
allow me to add the enctype without it being read as part of a page.
Once I get the paper done, I'll give it a try or if you want to, be my
guest. The format would be &nbsp;enctype="multipart/form-data"

Mike
 
D

DavidF

Mike,

That is very ambitious of you, but in this case I somehow suspect that the
OP will not want to go through the hassle of editing the code each time they
update their site.

I don't have the time to mess with it myself, and would suggest the OP check
out the possibility of their host providing an alternative, more
customizable form program before you invest much time in this. I would be
very surprised if the host doesn't provide something. Mine provides support
for Ultra Mail, as an example. Then, they could insert via the code fragment
tool. It would take a bit more work on the OP's part to get it set up, but
in the long run would be easier to maintain.

DavidF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top