1
    <div class="portlet-body">
            <form role="form" class="form-horizontal" name="frm_edit_details" id="frm_edit_details" method="POST" action="URL::route('sample/update/')">

            <?php if(isset($message) && $message != "") echo "<div class='alert alert-success alert-dismissable'>".$message."</div>";  ?>

            <h4>  Information </h4>

            <?php foreach($lists as $list): ?>

            <div class="row">
            <div class="form-group">

            <label  class="col-md-2 control-label"> Customer ID: </label>
            <div class="col-md-4">
            <input type="text" class="form-control"  placeholder="Number" id="CUSTOMER_ID" name="CUSTOMER_ID" value="<?php if(isset($list->CUSTOMER_ID)) echo ($list->CUSTOMER_ID); ?>" />                                            
             </div>

             <label  class="col-md-2 control-label">Invoice Number: </label>
             <div class="col-md-4">
             <input type="text" class="form-control"  placeholder="Number" name="INVOICE_NO" id="INVOICE_NO" value="<?php if(isset($list->INVOICE_NO)) echo ($list->INVOICE_NO); ?>"  />
             </div>

             <label  class="col-md-2 control-label">Phone Number: </label>
             <div class="col-md-4">
             <input type="text" class="form-control"  placeholder="Number" name="PHONE_NO" id="PHONE_NO" value="<?php if(isset($list->PHONE_NO)) echo ($list->PHONE_NO); ?>"  />
             </div>

             </div>
             </div>

             <br>
             <div class="form-group">
             <div class="col-md-offset-2 col-md-10">

             <a href="<?php echo URL::route('sample/update/', ($list->CUSTOMER_ID) ); ?>" class="btn blue">Submit</a>

             </div>
             </div>

             <?php endforeach; ?>
             </form>
</div>

while displaying the data in PHP form from Database, it is displaying the data in form.

after making some changes and clicking on submit i am able to capture only CUSTOMER_ID data remaining phone number and invoice number i am unable to capture.

I want to capture the complete data after some changes done in the form

Cœur
  • 37,241
  • 25
  • 195
  • 267
mouli
  • 31
  • 5
  • You are not submitting the form, you give anchor tag and labeled it as `submit`. so it is simply redirecting to you `sample/update/{account_id}`. you passed the account id with this route as parameter. So you are getting the account id only. – RAUSHAN KUMAR Jun 21 '17 at 07:05
  • how to capture the entire form Variables through the submit button, Can you help me with any syntax. – mouli Jun 21 '17 at 07:14
  • I give the answer below, try it – RAUSHAN KUMAR Jun 21 '17 at 07:19
  • Yes ,but i want to capture entire form variables and post it to the route::post(); – mouli Jun 21 '17 at 07:29

1 Answers1

0

you are not submitting your form, because your form has no submit button.Change this line

 <a href="<?php echo URL::route('sample/update/', ($list->ACCOUNT_ID) ); ?>" class="btn blue">Submit</a>

with

<input type="submit" name="submit" value="Submit"/>

and add one extra input field in your form to send account id along with your form as

<input type="text" name="accountId" value="{{$list->ACCOUNT_ID}}"/>

So now your form get submitted on this url sample/update/{accountId} as your form action is defined

RAUSHAN KUMAR
  • 5,846
  • 4
  • 34
  • 70
  • THANKS,but i want to capture the 3 variables data into the submit button not just the customer_id – mouli Jun 21 '17 at 07:25
  • put your submit button after this ``, because your form may have only one submit button. And why are you giving your input elements inside the for loop. If the elements repeats then their name will duplicates, so you will not get your all data – RAUSHAN KUMAR Jun 21 '17 at 07:29