How do you create multiple form steps with code first?
Hi there!
I want to be able to 1) upload a file and 2) do something with the data from it in a separate form step, all in a code first form.
So my first step would be to upload (and validate) the file, and then the second page would set up some prevalues based on what's in the file and allow the user to manipulate some things before saving.
Problem is I have no idea how to do this with code first, is there an example somewhere that I'm missing? I understand my entities are basically forms and fields... how do I express the form steps in code?
Here's another quick question: I want the file to be uploaded in the first step, but I don't want to submit the whole thing. Is there a way to accomplish this? I need the file uploaded for the second step.
How do you create multiple form steps with code first?
Hi there!
I want to be able to 1) upload a file and 2) do something with the data from it in a separate form step, all in a code first form.
So my first step would be to upload (and validate) the file, and then the second page would set up some prevalues based on what's in the file and allow the user to manipulate some things before saving.
Problem is I have no idea how to do this with code first, is there an example somewhere that I'm missing? I understand my entities are basically forms and fields... how do I express the form steps in code?
Thanks,
Dan
I figured it out. Have an enum with the steps (Pages)
public enum FormPages
{
PageOne = 1,
PageTwo = 2,
// etc.
}
Then mark the fields as appropriate.
[Field(FormPages.PageOne, ... etc)]
public string Username { get; set; }
This was not clear to me from the docs but it does work.
Here's another quick question: I want the file to be uploaded in the first step, but I don't want to submit the whole thing. Is there a way to accomplish this? I need the file uploaded for the second step.
Comment author was deleted
Yeah contour will perform the upload in the first step
is working on a reply...