Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3722134
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:47:42+00:00 2026-05-19T05:47:42+00:00

i’ve created a create view to create a new record. This view should be

  • 0

i’ve created a “create” view to create a new record. This view should be able to upload a picture on creating a new record.

I’ve created a form for submitting values, but when i create a second form within the current form (with a own submit button) for picture uploading the submit button for the second form doesn’t work.

Maybe you have an idea?

create.cshtml

@model Portal.Models.Portal_Auftrag
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script type="text/javascript">
    $(function () {
        $("#tabs").tabs();
        $("#DatumErstZul").datepicker({ dateFormat: 'dd.mm.yy' });
        $("#Schaden_Datum").datepicker({ dateFormat: 'dd.mm.yy' });
    });
</script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <div id="tabs">
        <ul>
            <li><a href="#tabs-5">Bild Unfallschaden</a></li>
        </ul>
        <div id="tabs-5">
            @Html.Action("WebAuftragUpload", ViewContext.RouteData.Values["Controller"].ToString(), new { id = ViewBag.AuftragGUID })
        </div>
    </div>
    <p>
        <input type="submit" name="submit_auftrag" value="Auftrag senden" />
    </p>

}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>

partial view:

<script type="text/javascript">
$(function () {
    $("#ajaxUploadForm").ajaxForm({
        iframe: true,
        dataType: "json",
        beforeSubmit: function () {
            $("#ajaxUploadForm").block({ message: '<h1><img src="/Content/jquery/busy.gif" /> Datei wird hochgeladen...</h1>' });
        },
        success: function (result) {
            $("#ajaxUploadForm").unblock();
            $("#ajaxUploadForm").resetForm();
            $.growlUI(null, result.message);
        },
        error: function (xhr, textStatus, errorThrown) {
            $("#ajaxUploadForm").unblock();
            $("#ajaxUploadForm").resetForm();
            $.growlUI(null, 'Fehler beim hochladen der Datei');
        }
    });
});
</script>
@using (Html.BeginForm("AjaxWebUpload", ViewContext.RouteData.Values["Controller"].ToString(), FormMethod.Post, new { id = "ajaxUploadForm", enctype = "multipart/form-data" }))
{   
    <input type="hidden" name="id" value="@ViewBag.AuftragGUID" />
    <input type="file" name="file" />
    <input id="ajaxUploadButton" type="submit" name="submit_file" value="Datei hochladen" />

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T05:47:43+00:00Added an answer on May 19, 2026 at 5:47 am

    You are not allowed to nest <form> elements. This is invalid HTML and results in undefined behavior. You should place the second form outside the first one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.