bestprotop / jquery-multifile-plugin

Automatically exported from code.google.com/p/jquery-multifile-plugin
0 stars 0 forks source link

[REQUEST] generated hidden inputs should include a "name" attribute #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.any use of the plugin
2.
3.

What is the expected output? What do you see instead?

The hidden generated input field for each uploaded file contains an "id"
attribute based on the "id" attribute of the input field you manage with
the plugin, but doesn't take into account the "name" attribute of the input
field. The same behaviour with the "name" attribute is desirable and maybe
needed for some applications. Example:

You upload 2 files with an input with "new-file" id.
The first hidden input would have "new-file_F1" id, and the second
"new-file_F2" id.
The hidden inputs can have also "new-file_F1" and "new-File_F2" name of
generate them according to the "new-file" input name if present.

What version of the plugin/jQuery are you using?
PLUGIN VERSION: 1.46
JQUERY VERSION: 1.3

On what browser(s) or operating system?
BROWSER(S): firefox, opera, chrome, explorer

Please provide a link to where the problem can be observed:
URL:

Feel free to provide any additional information below.

Original issue reported on code.google.com by che...@gmail.com on 11 Sep 2009 at 1:33

GoogleCodeExporter commented 9 years ago
The plugin doesn't change the name of the elements unless you explicitly 
configure it to do so. 

BUT you *can* do this by using the namePattern option.

$(..).MultiFile({
 namePattern: '$name_F$i'
});

Original comment by fyneworks on 26 Jan 2012 at 1:30