laker001 laker001 - 3 months ago 5
HTML Question

Formatting data in a modal html

I'm building a web application and i want to show some data in a modal, but i want it to have the following format:

Name: John
ID: 7


being John and the number 7 the data itself.

The problem is that i'm only able to achieve this using input boxes, like this:

<form>
<div class="form-group modal-body">
<label for="tableName" class="control-label">Name:</label>
<input type="text" class="form-control" id="tableName">
</div>
<div class="form-group modal-body">
<label for="tableID" class="control-label">ID:</label>
<input type="text" class="form-control" id="tableID">
</div>
</form>


How can i do this, so i don't have the input boxes surrounding the data ?

Answer

you can use <span> in the place of <input>

replace

<input type="text" class="form-control" id="tableName">

with

<span>John(some dynamic data)</span>

maybe this is what you are asking...

Comments