How to POST the data from a modal form of Bootstrap?

前端 未结 3 1841
野性不改
野性不改 2020-12-23 12:21

I have a page using a modal to get the users email and I want to add it to a list of subscribers (which is a Django model). Here is the modal code for that:

3条回答
  •  暖寄归人
    2020-12-23 12:50

    I was facing same issue not able to post form without ajax. but found solution , hope it can help and someones time.

    You can submit post form, from bootstrap modal using below javascript/jquery code : call the below function onclick of input submit button

        function form_submit() {
            document.getElementById("paymentitrform").submit();
       }  
    

提交回复
热议问题