How to stop foreach to repeat content? - php

I don't know PHP, so this might be a very basic question. I apologize in advance.
I'm working on a page that has a list of products and for each product, there is an option to delete it. The backend dev made it so it works great. However, they're not available at the moment and the client wants a modal that checks with the user if they're sure they want to delete a product before the action is complete.
I've included a modal. And just moved the delete action to the modal's 'Yes' button. However, because we have several products listed, it keeps repeating the button over and over. I realize this might be a basic fix, but I have no idea what I'm doing. Can someone please just take a look? Thank you!
Here's the (edited - I moved the action to the modal in this version) code:
<div class="container">
<div class="quotes">
<div class="col-md-12">
<div class="pages-header text-right">
New Product
</div>
</div>
<div class="col-md-12">
<div class="card rounded-0 border-0 active-products">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="mb-0">Products</h3>
</div>
<table class="table text-center" cellspacing="0">
<thead>
<tr>
<th scope="col" class="text-left quote-name">Name</th>
<th scope="col">Category</th>
<th scope="col">Hardware Price</th>
<th scope="col">Yearly License Cost</th>
<th scope="col">Monthly License Cost</th>
<th scope="col">Type</th>
<th scope="col" colspan="2"></th>
</tr>
</thead>
<tbody>
#foreach($products as $product)
<tr>
<th scope="col" class="quote-name">
{{$product->name}}
</th>
<th scope="col">
{{$product->category}}
</th>
<th scope="col">
{{$product->hardware_price}}
</th>
<th scope="col">
{{$product->yearly_license_cost}}
</th>
<th scope="col">
{{$product->monthly_license_cost}}
</th>
<th scope="col">
{{$product->type}}
</th>
<th scope="col" class="actions-col">
Edit
</th>
<th scope="col" class="actions-col">
Delete
</th>
</tr>
#endforeach
</tbody>
</table>
{{ $products->links() }}
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
#foreach($products as $product)
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
<form method="POST" action="{{route('product.destroy', $product)}}" id="delete-{{$product->id}}">
#csrf
#method('DELETE')
Delete
</form>
#endforeach
</div>
</div>
</div>
</div>
</div>
How do I tweak this?

You need to use pass data attr in delete button and append into modal form using js script.
Change into HTML
Delete
Add JS Script
$(document).on('click', '.deleteproduct', function(e) {
e.preventDefault();
var id = $(this).attr('data-id');
var product = $(this).attr('data-product');
$('#Deletefrm').attr('id','delete-'+id);
$('#Deletefrm').attr('action','/product.destroy/'+product);
});
$('#deleteModal').on('hidden.bs.modal', function(e) {
$('#Deletefrm').attr('id','');
$('#Deletefrm').attr('action','');
});
Change in Modal
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
<form method="POST" id="Deletefrm" action="" id="">
#csrf
#method('DELETE')
Delete
</form>
</div>

<div class="container">
<div class="quotes">
<div class="col-md-12">
<div class="pages-header text-right">
New Product
</div>
</div>
<div class="col-md-12">
<div class="card rounded-0 border-0 active-products">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="mb-0">Products</h3>
</div>
<table class="table text-center" cellspacing="0">
<thead>
<tr>
<th scope="col" class="text-left quote-name">Name</th>
<th scope="col">Category</th>
<th scope="col">Hardware Price</th>
<th scope="col">Yearly License Cost</th>
<th scope="col">Monthly License Cost</th>
<th scope="col">Type</th>
<th scope="col" colspan="2"></th>
</tr>
</thead>
<tbody>
#foreach($products as $product)
<tr>
<td scope="col" class="quote-name">
{{$product->name}}
</td>
<td scope="col">
{{$product->category}}
</td>
<td scope="col">
{{$product->hardware_price}}
</td>
<td scope="col">
{{$product->yearly_license_cost}}
</td>
<td scope="col">
{{$product->monthly_license_cost}}
</td>
<td scope="col">
{{$product->type}}
</td>
<td scope="col" class="actions-col">
Edit
</td>
<td scope="col" class="actions-col">
Delete
</td>
<td>
<div class="modal fade" id="deleteModal-{{$product->id}}" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel-{{$product->id}}" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel-{{$product->id}}">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
#foreach($products as $product)
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
<form method="POST" action="{{route('product.destroy', $product)}}" id="delete-{{$product->id}}">
#csrf
#method('DELETE')
Delete
</form>
#endforeach
</div>
</div>
</div>
</div>
</td>
</tr>
#endforeach
</tbody>
</table>
{{ $products->links() }}
</div>
</div>
</div>
<!-- Modal -->
</div>

Related

Laravel On click Event Button [Enable button after upload file]

I have a table which contain two buttons, one is for uploading a file and the other one is for giving score. What I want to do is to give a condition for the second button which is the scoring button, whereby it can't be clicked (disabled) if there is no file uploaded. How can I achieve this?
Here is what my table looks like:
And here is my AdminController for the table
public function showpekerjaanppk(){
if(Auth::user()->status=='super'){
$pekerjaan = Pekerjaan::with('penyedia','user')->paginate();
return view('admin.showpekerjaan', compact('pekerjaan'));
}else{
$pekerjaan = Auth::user()->pekerjaans;
return view('admin.showpekerjaan', compact('pekerjaan'));
}
//return view('admin.showpekerjaan', compact('penyedia','pekerjaan','totalAvg'));
}
And here is my blade file for the table
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
#if (Auth::user()->status=='super')
<h3 class="card-title"><b>{{$penyedia->nama}}</b></h3> <br>
<h3 class="card-title">Nilai Total: <b>{{$totalAvg}}</b></h3>
#else
<h3 class="card-title"><b></b></h3> <br>
<h3 class="card-title"></b></h3>
#endif
<!-- /.card-header -->
<div class="card-body table-responsive">
<table id="tabelpekerjaan" class="table table-bordered">
<thead>
<tr>
<th style="width: 10px" rowspan="2">No.</th>
<th rowspan="2">Tanggal</th>
<th rowspan="2">Paket Pekerjaan</th>
<th rowspan="2">Nama Perusahaan</th>
<th rowspan="2">Lokasi Pekerjaan</th>
<th rowspan="2">PPK</th>
<th rowspan="2">Nilai Kontrak</th>
<th rowspan="2">Nilai</th>
<th rowspan="2">BAHP</th>
<th colspan="2">Aksi</th>
</tr>
<tr>
<td>BAHP</td>
<td>Nilai</td>
</tr>
</thead>
<tbody>
#php $no = 1; /*$totalNilai = 0.0;*/ #endphp
#foreach ($pekerjaan as $pekerjaans)
<tr>
<td>{{$no++}}</td>
<td>{{$pekerjaans->tanggal}}</td>
<td>{{$pekerjaans->pekerjaan}}</td>
<td>{{$pekerjaans->penyedia->nama}}</td>
<td>{{$pekerjaans->lokasi}}</td>
<td>{{$pekerjaans->user->name}}</td>
<td>Rp. {{number_format($pekerjaans->nilai_kontrak,0,',',',')}}</td>
#php
$pekerjaans->nilai_total = $pekerjaans->nilai_1 + $pekerjaans->nilai_2 + $pekerjaans->nilai_3 + $pekerjaans->nilai_4;
#endphp
<td>{{$pekerjaans->nilai_total}}</td>
<td>{{$pekerjaans->bahp}}</td>
<td>
Upload
</td>
<td>
Penilaian //disabled untill file uploaded
</td>
</tr>
#endforeach
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
#if (Auth::user()->status=='super')
<div class="card-footer">
Kembali
</div>
#endif
</div>
</section>
Thank you in advance.
#if(isset($pekerjaans->yourFileCulmnName))
<td>
Penilaian //disabled untill file uploaded
</td>
#endif

How to pass modal id to controller and model for using in query

I am making a modal using looping data from the database on my project but I want to fetch all data in a database by selecting query GROUP BY color where id = modal id but my controller can't get the modal id which makes it error on selecting. please help me to fix it... thank you
this is the View code :
<table class="table table-bordered table-hover table table-sm" id="dataTable" width="100%" cellspacing="0">
<thead class="warna-header">
<tr>
<th rowspan="2" style="vertical-align:middle;text-align:center;">Tipe</th>
<th colspan="3" class="text-center bg-danger">1</th>
<th colspan="3" class="text-center bg-warning">2</th>
<th colspan="3" class="text-center bg-success">3</th>
<th rowspan="2" style="vertical-align:middle;text-align:center;" class="text-center">ACTION</th>
</tr>
</thead>
<tbody>
<?php foreach ($st_mobil as $st_mbl) : ?>
<tr>
<td style="font-size:12px;color:black;"><?php echo $st_mbl['jenismobil']; ?></td>
<td style="font-size:12px;color:black;text-align:center;"><?php echo $st_mbl['beli1']; ?></td>
<td style="font-size:12px;color`enter code here`:black;text-align:center;"><?php echo $st_mbl['jual1']; ?></td>
<td style="font-size:12px;color:black;text-align:center;"><?php echo $st_mbl['sisa1']; ?></td>
<td class="text-center">
<a href="" class="btn btn-success btn-sm view_detail" data-toggle="modal" title="Edit Data" data-target="#ViewStockMobilModal<?php echo $st_mbl['id']; ?>">
<span class="icon text-white-10">
<i class="fas fa-search"></i>
</span>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
-- Modal View
<?php foreach ($st_mobil as $st_mbl) : ?>
<div class="modal fade bd-example-modal-lg" id="ViewStockMobilModal<?php echo $st_mbl['id']; ?>" tabindex="-1" role="dialog"
aria-labelledby="ViewStockMobilModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header bg-primary">
<h5 class="modal-title" id="jenismobil" name="jenismobil">
<font color=white><?php echo $st_mbl['jenismobil']; ?></font>
</h5>
<button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<table class="table table-bordered table-striped table-sm">
<thead class="btn-primary">
<tr>
<th style="font-size:12px;" class="text-center bg-danger">ST</th>
<th style="font-size:12px;" class="text-center bg-danger">BK</th>
<th style="font-size:12px;" class="text-center bg-danger">BJ</th>
</tr>
</thead>
<?php foreach($view_detail as $vdt) : ?>
<tbody>
<tr>
<td style="font-size:12px;color:black;"><?php echo $vdt['warna']; ?></td>
<td style="font-size:12px;color:black;text-align:center;"><?php echo $vdt['st_in_1']; ?></td>
<td style="font-size:12px;color:black;text-align:center;"><?php echo $vdt['st_out_1']; ?></td>
</tr>
</tbody>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
This is the controller :
$data['st_mobil'] = $this->db->get('st_mobil')->result_array();
$id = $this->input->get($id); // i want to get the id of my modal
$data['view_detail'] = $this->stock_model->get_view_modal($id);
This is my model :
public function get_view_modal($id)
{
$query = "SELECT `id`,`jenismobil`,`warna`,`st_in_1`,`st_out_1`,`st_sisa_1`,`st_in_2`,`st_out_2`,`st_sisa_2`,`st_in_3`,`st_out_3`, st_sisa_3`
FROM `st_mobil`
GROUP BY `warna`
WHERE `id` = '$id'
";
return $this->db->query($query)->result_array();
}
When you getting the id
$id = $this->input->get('id'); // this should corrected like this.

Laravel: Displaying the list with same URL when clicking the html button

I'm facing an issue, please see the below screenshot.
Screenshot
In the screenshot, you can see its image upload page. By default, the Add Image button and the table which showing the lists should be display. The concept that I want to implement is when I click the Add Image button, the table lists should be hidden and have to show the image upload section. This all should be happen in the same URL.
Below is the code:
Route:
Route::post('/imageupload', 'Admin\ImageController#imageUploadPost')->name('image.upload.post');
Blade File:
<div class="panel panel-container">
<button type="button" class="btn btn-primary">Add Image</button>
</div>
<div class="panel panel-container">
<table class="table table-striped" id="slideshow">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>#mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>#fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>#twitter</td>
</tr>
</tbody>
</table>
</div>
<div class="panel panel-container hide-img-upload">
<form action="{{ route('image.upload.post') }}" method="POST" enctype="multipart/form-data">
#csrf
<div class="row">
<div class="col-md-6">
<input type="file" name="image" class="form-control">
</div>
<div class="col-md-6">
<button type="submit" class="btn btn-success">Upload</button>
</div>
</div>
</form>
</div>
</div>
Controller:
public function imageUploadPost()
{
return back()
->with('success','You have successfully upload image.')
->with('image',$imageName);
}
Since, I'm new to Laravel, I couldn't able to see the solution.
Any help will be appreciated.
Try this
<div class="panel panel-container">
<button type="button" class="btn btn-primary"data-toggle="modal"data-target="#myModal">Add Image</button>
</div>
<div class="panel panel-container">
<table class="table table-striped" id="slideshow">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>#mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>#fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>#twitter</td>
</tr>
</tbody>
</table>
</div>
<div class="modal" id="myModal" role="dialog"
aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Upload Image </h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="container"></div>
<div class="panel panel-container hide-img-upload">
<form action="{{ route('image.upload.post') }}" method="POST" enctype="multipart/form-data">
#csrf
<div class="row">
<div class="col-md-6">
<input type="file" name="image" class="form-control">
</div>
<div class="col-md-6">
<button type="submit" class="btn btn-success">Upload</button>
</div>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
or use javascript hidden show for this
this is more about html and javascript staff.
You can use this as hint.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<button onclick="alter()">Alter</button>
<div id="first">First</div>
<div id="sec">Second</div>
<script>
document.getElementById('sec').style.visibility = 'hidden';
function alter(){
if(document.getElementById('sec').style.visibility == 'hidden'){
document.getElementById('sec').style.visibility = 'visible';
document.getElementById('first').style.visibility = 'hidden';
}else{
document.getElementById('sec').style.visibility = 'hidden';
document.getElementById('first').style.visibility = 'visible';
}
}
</script>
</body>
</html>
Firstly define id for file input;
<input type="file" name="image" id="file_input" class="form-control">
After define id for list scope;
<div class="panel panel-container" id="list_scope">
Finally add JavaScript codes;
<script>
document.getElementById('file_input').onclick = function() {
document.getElementById('list_scope').style.display = "none";
};
</script>

Gentellela template - Multiple datatables in one page

I am using gentellela template which is having a data table id to datatable.
Now im doing modal popup of table and include it into one page which is having a button to call all those modals.
My problem is when 2 modals have table id to datatable. the other datatable seems broken. All i want is to have those datatable working properly.
this is my first modal.
<div class="modal fade" id="USERSVIEW" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" >
<div class="modal-content">
<div class="modal-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>View Users</h2>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
<div class="clearfix"></div>
</div>
<div class="x_content">
<table id="datatable" class="table table-striped table-bordered dt-responsive nowrap dataTable" cellspacing="0" width="100%">
<thead>
<tr>
<th style="text-align: center;"> Branch Code </th>
<th style="text-align: center;"> Branch Name </th>
<th style="text-align: center;"> Branch Address </th>
<th style="text-align: center;"> Branch Admin Name </th>
<th style="text-align: center;"> Status </th>
</tr>
</thead>
<tbody>
<?php include 'includes/dashboarduserfetch.php';?>
</tbody>
</table>
<div class="ln_solid"></div>
<button class="btn btn-danger" class="close" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
And this is my second modal.
<div class="modal fade" id="TASKSVIEW" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" >
<div class="modal-content">
<div class="modal-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>View Tasks</h2>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
<div class="clearfix"></div>
</div>
<div class="x_content">
<table id="datatable" class="table table-striped table-bordered dt-responsive nowrap dataTable" cellspacing="0" width="100%">
<thead>
<tr>
<th style="text-align: center;"> Branch Code </th>
<th style="text-align: center;"> Task Code </th>
<th style="text-align: center;"> Task Name </th>
<th style="text-align: center;"> Task Description </th>
<th style="text-align: center;"> Expiry Date </th>
<th style="text-align: center;"> Status </th>
</tr>
</thead>
<tbody>
<?php include 'includes/dashboardtaskfetch.php';?>
</tbody>
</table>
<div class="ln_solid"></div>
<button class="btn btn-danger" class="close" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
i want to call the same modal in other page which is having these buttons to call modal.
<button class="btn btn-primary" data-toggle="modal" data-target="#USERSVIEW" style="width:90%; margin-left:5%; margin-top:-3%;">View Users Created</button>
<button class="btn btn-primary" data-toggle="modal" data-target="#TASKSVIEW" style="width:90%; margin-left:5%; margin-top:-3%;">View Tasks Created</button>
Id attribute should be unique for each element so just change the id to datatable1 and datatable2
1st : For table 1 id should be datatable1 .
Html :
<table id="datatable1" class="table table-striped table-bordered dt-responsive nowrap dataTable" cellspacing="0" width="100%">
Script:
$('#datatable1').dataTable({ .... });
2nd : For table 2 id should be datatable2 .
Html :
<table id="datatable2" class="table table-striped table-bordered dt-responsive nowrap dataTable" cellspacing="0" width="100%">
Script:
$('#datatable2').dataTable({ .... });
The id attribute should be unique in your example will match the first id in the page
Use class if all table has the same dataTable options
Change the id="datatable" to class="datatable" or add datatable to class attribute
And call
$('.datatable').dataTable();
If you have different options change for each table just change id for each. id="datatable1" , id="datatable1"
And call like
$('#datatable1').dataTable({});
$('#datatable2').dataTable({});

Displaying value in textbox for to edit using ajax and php

editModal.php
<div id="edit-modal" class="modal fade" tabindex="-1" role="dialog" aria- labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">
<i class="glyphicon glyphicon-edit"></i> Edit Profile
</h4>
</div>
<div class="modal-body">
<div id="modal-loader" style="display: none; text-align: center;">
</div>
<div id="dynamic-content">
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>First Name</th>
<td id="txt_first">
<input id="result_table" type="text" class="form-control" name="Firstname" ng-model="name">
</td>
</tr>
<tr>
<th>Middle Name</th>
<td id="txt_middle" > </td>
</tr>
<tr>
<th>Last Name</th>
<td id="txt_last"></td>
</tr>
<tr>
<th>Email Add</th>
<td id="txt_emailadd"></td>
</tr>
<tr>
<th>Contact Number</th>
<td id="txt_cnumber"></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" value="send" name="submit" class="btn btn-primary">Save Changes</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div><!-- /.modal -->
</div>
$(document).on('click', '#getUser', function(e){
e.preventDefault();
var uid = $(this).data('id'); // get id of clicked row
$('#dynamic-content').hide(); // hide dive for loader
$('#modal-loader').show(); // load ajax loader
$.ajax({
url: '../model/editUser.php',
type: 'POST',
data: 'id='+uid,
dataType: 'json'
})
.done(function(data){
console.log(data);
$('#dynamic-content').hide(); // hide dynamic div
$('#dynamic-content').show(); // show dynamic div
$('#txt_first').html(data.First_Name);
$('#txt_middle').html(data.Middle_Name);
$('#txt_last').html(data.Last_Name);
$('#txt_emailadd').html(data.Email_Add);
$('#txt_cnumber').html(data.Contact_Number);
$('#modal-loader').hide(); // hide ajax loader
})
.fail(function(){
$('.modal-body').html('<i class="glyphicon glyphicon-info-sign"></i> Something went wrong, Please try again...');
});
});
});
</script>
I wanted to display the value of the $('#txt_first').html(data.First_Name); on the input type="text" value = "php echo $firstName " But it seems that I'm doing it wrong. Is it possible for me to enclosed the table and the script in a ; segment?
It is input field so you need to do it with 'value' not 'html'. try this:
$('#txt_first').val(data.First_Name);
Created demo to display data.First_Name in input type ="text"
$('#result_table').val("test");
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table class="table table-bordered">
<tr>
<th>First Name</th>
<td id="txt_first">
<input id="result_table" type="text" class="form-control" name="Firstname" ng-model="name">
</td>
</tr>
<tr>
<th>Middle Name</th>
<td id="txt_middle" > </td>
</tr>
<tr>
<th>Last Name</th>
<td id="txt_last"></td>
</tr>
<tr>
<th>Email Add</th>
<td id="txt_emailadd"></td>
</tr>
<tr>
<th>Contact Number</th>
<td id="txt_cnumber"></td>
</tr>
</table>

Categories