1 year ago

Submit Button not working inside form tag

Posted 1 year ago by Mike_3096

Hey Guys, I'm trying to send data to controller with a form i have assigned action both as url and controller but still its not working. Submit button does not do any thing it remains static


     <div class="dowp-down2">

         <button class="btn btn-primary col-md-12" type="button" data-toggle="collapse" data-target="#exp2" aria-expanded="false" aria-controls="collapseExample" style="margin-top: 2vh;" onclick="save();">
           Enter detail

        <div class="collapse" id="exp2">
            <div class="card card-body">
                       <form action="{{ action('[email protected]') }}" method="POST"                                      enctype="multipart/form-data" >
                        Name:<input type="text" name="name" style="width: 15vh;"><br/>
                        E-mail:<input type="email" name="email" style="width: 15vh;"><br/>
                        Contact:<input type="number" name="contact" value="+91" style="width: 15vh;"><br/>
                        Amount:<input type="number" name="amount" readonly="readonly" value="0" id="selAmt" style="width: 10vh;">
                        <input type="button" value="Submit">


My controller

public function show(Request $request)
    $name = $request->name;
    $email =$request->email;
    $contact = $request->contact;
    $amount = $request->amont;

    return view('fontend.finalform',["name"=>$name,"email"=>$email,"contact"=>$contact,"amount"=>$amount]);

Please sign in or create an account to participate in this conversation.