Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrew B 22 posts 142 karma points
    Nov 27, 2014 @ 11:37
    Andrew B
    0

    Custom file upload data type value lost on returning to previous form stage

    As described in a previous post to this forum (found here) I have implemented a custom file upload file type for the purposes of only permitting files below a certain size to be uploaded. After resolving an initial problem with these fields being mandatory by implementing custom server-side validation code suggested by another Contour user, a second problem has presented itself which goes as follows:

    1. Upload file using custom file upload data type set as mandatory on form step 1

    2. Click next to proceed to form step 2

    3. Click back to return to form step 1

    4. Click next to proceed to form step 2

    When attempting to proceed to form step 2, the validation code no longer recognises that a file has been previously uploaded and prevents the user from progressing. Debugging has revealed that the Value attribute of the file upload field's Field object (as retrieved from Form.AllFields) is an empty collection in my custom FormRenderController.FormValidate handler, so I can't check it there. Is there any way I can check the actual stored value of a form field, or does anybody have an alternative solution?

    The site uses Umbraco 4.11.10 with Contour 3.0.21. The live environment is Windows Server 2008 with IIS 7.5 and the development environment is Windows 7 with IIS 7.5 - the issue occurs in both environments.

  • Comment author was deleted

    Nov 28, 2014 @ 12:50

    Hmm interesting one, will have to do some testing to see how we can avoid this problem, will add to todo for next week so you can expect an update then

    Cheers,
    Tim 

  • Andrew B 22 posts 142 karma points
    Jul 20, 2015 @ 15:23
    Andrew B
    0

    Has any progress been made in resolving this? I am now trying to let users resume partially-submitted forms by passing their record GUID in as a query string parameter (as per the instructions found in this thread) which works fine, but they are prevented from progressing past stages with a custom file upload control by this problem.

  • Comment author was deleted

    Aug 26, 2015 @ 14:48

    Mind sharing the code for both the fieldtype and the validation? Then I can try to reproduce

Please Sign in or register to post replies

Write your reply to:

Draft