Question

It's a wizard multi-page form. After filled each page the form data must be previewed on a simple plain text pop-up view(div) and then eventually submit to the server-->database or the user might decide to return back to the wizard and add fields or alter the form entries before again previewing and submitting it. The wizard pages are divs that are hidden/shown, thus no server interaction occurs until preview and submit.

I am trying:

@using (Ajax.BeginForm("myAction", "myController", 
        new AjaxOptions { UpdateTargetId = "splashFormAndPreview" }))
{
      <input type="text" name="name" id="name"/>
      <input type="text" name="address" id="address"/>
      <input type="checkbox" name="airConditioned" id="airConditioned"/>
                            ...
                            ...
      <input type="submit" value="Preview&Submit" id="previewSubmButon"/>
}
<div id="splashFormAndPreview"></div>

!!! In case it matters or/and it's helpful: "myAction" and "myController" are different from the one of the view above. Also the form is previewed on a different view splashed in the splashFormAndPreview div.

With the code above after the pop-up preview is closed to return back to the wizard for alternations the wizard is non-responsive and the data is gone.

How can I retain/hold the data on the page and post the form asynchronously in case the user returns to alter the form fields from the preview?

No correct solution

OTHER TIPS

Found my problem!

I had double reference to my jquery scripts on the same page, which was causing the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top