sfFormWidgetFileInput lets you upload a file. But if there are any validation errors anywhere in the form and the form must be re-presented, that file is gone and you must browse again (a browser security feature).
sfFormWidgetFileInputEditable sounds like a great workaround for this, but that's not really what it's for: sfFormWidgetFileInputEditable allows you to replace the current file associated with the object managed by a Doctrine or Propel form. That is, the object has already been saved in the past, and you're choosing to replace it. It's a nice feature, but the same problem exists with this widget: if you mess up your changes to any unrelated field, you have to reselect the file too. I've solved this problem repeatedly in the past - but not in a clean and reusable way - in Symfony 1.0 code, by accepting the file upload provisionally in the validate method of the action and allowing the user to keep trying the rest of the fields until their form is completely valid without selecting a file yet again. What seems to be needed here is a file widget that automatically preserves the user's most recent successful file upload while the validation process continues, displaying a message letting the user know they can still click browse if they really want to select a different file. But before I set about trying to code that, I want to verify that it hasn't already been done. Anyone? Is there a plugin for this or a feature I'm missing? Thanks! -- Tom Boutell www.punkave.com www.boutell.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
