Here is a DTML method called 'upLoad': <form action="testForm" METHOD="POST"> <input type="FILE" name="file"> <input type="submit"> </form> Here is the DTML method called 'testForm': <dtml-var REQUEST> <dtml-if "REQUEST.form['file'] == ''"> Empty <dtml-else> Not Empty </dtml-if> Have a nice weekend Arno On Sat, 17 Mar 2001, Marc Fischer wrote:
Learning Zope is sometimes not really funny! Ok, here's another question of mine:
In a form I give users the possibility to upload a file with the following tag:
<input type=file name="file">
In the next dtml method which is called from here I want to test, if the user has selected a file or not. If the input field is empty, I don't want to do anything, but how could i test?
I tried it with: <dtml-if REQUEST.form['file']<>''> ... but without succes!
Perhaps some can explain HOW and WHY, please!!!
Best Regards, ... Marc
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )