-1

Here is a simple form :) I've made a menu-slide where I want have also a form. Mine question is: Is it possible to send data from both of the forms to the other page whit one "submit-button" ????? Google doesn't know or it's just a stupid question and there is a better solution for this :)

thnx in advanced.

<!DOCTYPE html>
<html>
    <head>
    <title>Slideout menu</title>
    <style>
        .menu{
            overflow-x: hidden;
            position: relative;
            left: 0;
        }
        .menu-open{
            left: 231px;
        }
        .menu-open .menu-side{
            left: 0;
        }
        .menu-side,.menu{
            -webkit-transition: left 0.2s ease;
            -moz-transition: left 0.2s ease;
            transition: left 0.2s ease;
        }
        .menu-side{
            background-color: #333;
            border-right: 1px solid #000;
            color:#fff;
            position: fixed;
            top: 0;
            left: -231px;
            width: 210px;
            height: 100%;
            padding: 10px;
        }
    </style>
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body class="menu">
    <header>
        <a href="#" class="menu-toggel">toggel button</a>
        <nav class="menu-side">
            this is a site menu
            <form action="" method="post">
                <input type="text" name="titel" value="data to send when submit" id="name">
                <input type="submit" value="register">
            </form>
        </nav>
    </header>
    <form action="" method="post">
        <label for="titel">Titel</label>
        <input type="text" name="titel" value="data to send when submit" id="name">
        <label for="omschrijving">omschrijving</label>
        <input type="text" name="omschrijving" id="omschrijving" value="data to send when submit" autocomplete="off">
        <label for="email">Uw emailadres</label>
        <input type="text" name="email" id="email" value="data to send when submit">
        <label for="naam">Uw naam</label>
        <input type="text" name="naam" id="naam" value="data to send when submit">
    </form>
</body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script>
    (function() {
        var body = $('body');
        $('.menu-toggel').bind('click', function(){
           body.toggleClass('menu-open');
           return false;
        });
    })();
</script>

hexedecimal
  • 279
  • 1
  • 2
  • 9

1 Answers1

1

No it's not possible. Only one form can be submitted at a time. There are workarounds that you can do, for example use javascript to get the values of the fields from the two forms and posting it to a page, or just wrap all the fields in one <form> tag

Pierre
  • 1,553
  • 12
  • 22