Multi-steps Online Forms web part throwing error on file upload

'dipo Majekodunmi asked on December 30, 2015 11:16

I am using the Multi-steps Online Forms web part from the market place on Kentico 8.2 and it works fine except for alternative forms with file upload fields. This gives the error below in the event log:

EventDescription: 
Message: Object reference not set to an instance of an object.
Exception type: System.NullReferenceException
Stack Trace: 
   at CMS.OnlineForms.BizForm.SaveDataInternal()

A review of the web part shows that it hides the bizform submit button and adds two new buttons - Prev and Next. The next button click event handler then calls the SaveData method on the bizform.

protected void Next_Click(object sender, EventArgs e)
{
    viewBiz.SaveData(viewBiz.RedirectUrlAfterSave);
}

If I make the submit button visible and click it instead of the Next button, the file is uploaded successfully. This implies that the submit button click event does something before calling the SaveDataInternal method that is throwing the exception. I would appreciate every help in figuring this out.

Recent Answers


Roman Hutnyk answered on December 30, 2015 16:54

This might be a good question for the developer of that web part.

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on January 4, 2016 16:38

Are any of the webparts wrapped in an ajax update panel? A normal file upload field won't work inside of an update panel. That could be causing this issue, otherwise was that package made for version 8.2? If not, did you upgrade it? I know it was available in 7, but not sure if it was ported over to 8.2

0 votesVote for this answer Mark as a Correct answer

'dipo Majekodunmi answered on January 4, 2016 17:02

Thanks Joshua. The web part included 8.2 as supported versions and is not wrapped in an update panel. I eventually just modified the web part to show the submit button on the alternate form that had the file upload fields and renamed the button to upload documents. It's a hack, but it helps move the project along.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.