[CLOSED] FileUploadField ClearOnSubmit

  1. #1

    [CLOSED] FileUploadField ClearOnSubmit

    Using the example FileUploadField how would you clear the Photo: field after pressing the save button?

    I am looking at the "Form Example" section of the example. I have tried several things and must be missing something.
    Last edited by Daniil; Feb 04, 2014 at 11:35 AM. Reason: [CLOSED]
  2. #2
    Hi Chris,

    Are you reporting that the ClearOnSubmit property doesn't work? Or just asking a way to clear it manually by JavaScript? If the second, please use:
    App.FileUploadField1.reset();
  3. #3
    Great. To clear out the TextField and FileUploadField contents I added the following line
    Success="App.BasicForm.reset();"
    to the SaveButton

                <ext:Button ID="SaveButton" runat="server" Text="Save" Disabled="true">
                    <DirectEvents>
                        <Click OnEvent="UploadClick"
                            Before="if (!#{BasicForm}.getForm().isValid()) { return false; } 
                                    Ext.Msg.wait('Uploading your photo...', 'Uploading');"
                            Success="App.BasicForm.reset();" 
                            Failure="Ext.Msg.show({ 
                                    title   : 'Error', 
                                    msg     : 'Error during uploading', 
                                    minWidth: 200, 
                                    modal   : true, 
                                    icon    : Ext.Msg.ERROR, 
                                    buttons : Ext.Msg.OK 
                                });">
                        </Click>
                    </DirectEvents>
                </ext:Button>
  4. #4
    OK.

    Please clarify is ClearOnSubmit not suitable for you?

Similar Threads

  1. fileuploadfield and emptytext
    By Birgit in forum 2.x Help
    Replies: 0
    Last Post: Jul 09, 2013, 1:57 PM
  2. FileUploadField help
    By osxboy in forum 1.x Help
    Replies: 0
    Last Post: Jul 26, 2010, 9:50 AM
  3. FileUploadField has limit ???
    By Puia in forum 1.x Help
    Replies: 3
    Last Post: Mar 01, 2010, 4:02 PM
  4. FileUploadField can't work
    By Fresh.Killer in forum 1.x Help
    Replies: 1
    Last Post: Dec 07, 2009, 8:26 AM
  5. FileUploadField
    By matthaus in forum 1.x Help
    Replies: 0
    Last Post: Jun 01, 2009, 6:05 AM

Posting Permissions