Grzegorz ?lusarek wrote:
Hi All. One of the fields used in my form is to upload file, Is is to
posible to made this field readonly and after filling radio field set
this to use by javascript. I don't wanna give a User chance to upload
file until he check in the form that he want's to upload File.
thanks for any help
Gregor
Hi,
You cannot do a lot of scripting against a file-upload formelement in
Javascript.
This is intentionally because if scripting was possible, you would be able
to add more files (for example: all kind of systemfiles), and create a
serious securityproblem.
I think the easiest solution for you is using CSS:
1) Place the fileuploadpart in a div that has display:none
2) Once the checkbox is checked, you change this to display=block.
Please note that people who have JS disabled will be left out with the
described solution, because they have no way of making the div visible
again.
Regards,
Erwin Moller