On Thu, May 19, 2011 at 7:33 AM, Michel30 <forerunn...@gmail.com> wrote:
> This gives me a file field, a browse button and a submit button. What
> I'd like to have is a submit button only, click that opens a file
> dialog.
> Any ideas?

You cannot do that. File controls are strictly only opened by browsers
under direct user input, for security reasons. Similarly, you cannot
provide an initial or default value to a file field.

What you can do is not have any submit button at all, and submit the
form by observing a change on the file field. IMO, you shouldn't do
that either, as it allows no chance for the user to change their mind.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to