Home:ALL Converter>Pass Multiple Values to Bootstrap Modal Form

Pass Multiple Values to Bootstrap Modal Form

Ask Time:2013-11-27T04:12:51         Author:Alex Webster

Json Formatter

I have an html table of 'members' and on each row an 'edit' button.

The edit button opens a Bootstrap modal with a form.

I would like to pre-fill the form fields, based on the values (name, email, mobile) in the relevant row. I used code from this answer (not the accepted answer but this function from @ajkochanowicz):

$('.header-link').click(function(e) {
$('.modal-header h4').html($(e.target).html())
})

Passing Data to Bootstrap Modals

... but it only allows for a single value to be passed.

how can I pass multiple values to the modal form and inject them into the relevant fields in the modal form?

Author:Alex Webster,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/20227015/pass-multiple-values-to-bootstrap-modal-form
yy