Modal Form reusable.

11 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Julio Parra-Sanchez

ungelesen,
28.06.2019, 13:05:3428.06.19
an django...@googlegroups.com
Buenos Dias Amigos,

Alguno de ustedes ha utilizado los modal de bootstrap y reutilizarlo como template, pasandole como variable el modal que van a renderizar?

Gracias y espero me haya explicado bien.
------------------------------------------------------
Hello Guys,
Have any of you used bootstrap's manners and reused it as a template, passing as a variable the modal to render it?
thanks

--

    name     : "Julio Parra Sanchez", 
    title    : "Apprentice Developer", 
    company  : "Techtonic", 
    location : "Denver, CO" 
}

Volodymyr Sergeyev

ungelesen,
01.07.2019, 03:04:4001.07.19
an Django users
Buenos Dias,

May be this will help.

Modal has an event, fired when it is about to show https://getbootstrap.com/docs/4.0/components/modal/#events
Event - 'show.bs.modal'

So you may bind handler to it and render modal with fields you wish:

$('#dynamic_modal').on('show.bs.modal', function (e) {
    
$('#dynamic_modal').find(".modal-body").html(YOUR_NEW_CONTENT);
});

Regards,

V.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten