displaying table data inside a bootstrap 4 modal

displaying table data inside a bootstrap 4 modal

Creator_Creator_ Posts: 4Questions: 1Answers: 0

https://jsfiddle.net/m0zxgy97/7/

No errors are shown or reported using the datatables debug tool.

Hello, I want the data inside of the table to be displayed inside of a bootstrap 4 modal, inside of this modal I would like to display the Id, Name, Market cap, and the %24H. How would I go about doing this? I created a jsfiddle to display the problem.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    edited September 2020

    Thanks for the fiddle, but it's not running. This example here might help, it's showing a BS4 modal, it came from this thread,

    Colin

  • Creator_Creator_ Posts: 4Questions: 1Answers: 0

    Hm not sure why the fiddle is not running, can you try this codepen?

    https://codepen.io/nielsvanhoof/pen/mdPjdxy

    Would explain the thing I want to do more thorough.

    I want to display the data from an existing table inside of a modal

  • kthorngrenkthorngren Posts: 20,264Questions: 26Answers: 4,764

    The example Colin linked to shows the HTML table is inside the modal-body div. You need to do the same. See the Bootstrap Modal Docs for details of how to layout the modal.

    Kevin

  • Creator_Creator_ Posts: 4Questions: 1Answers: 0

    Hey, I think we are misunderstanding each other.

    I want to display data FROM an existing table inside of a bootstrap 4 modal.

    e.x: I want to get the value from my name table and display this data as the bootstrap 4 modal title.

  • kthorngrenkthorngren Posts: 20,264Questions: 26Answers: 4,764
    Answer ✓

    I see. This example shows how to get the row data of the clicked row. Instead of using an alert you can display it in modal.

    Kevin

  • Creator_Creator_ Posts: 4Questions: 1Answers: 0
    edited September 2020

    That was it thank you!

This discussion has been closed.