Can you nest html forms?

前端 未结 20 3160
悲&欢浪女
悲&欢浪女 2020-11-21 04:56

Is it possible to nest html forms like this

so

20条回答
  •  情话喂你
    2020-11-21 05:09

    Really not possible... I couldn't nest form tags... However I used this code:

    OTHER FORM STUFF
    THIS FORM STUFF

    with {% csrf_token %} and stuff

    and applied some JS

    var url = $(form_id).attr("data-url");
    
    $.ajax({
      url: url,
      "type": "POST",
       "data": {
        'csrfmiddlewaretoken': '{{ csrf_token }}',
        'custom-param-attachment': 'value'
      },
      success: function (e, data) {
          if (e.is_valid) {
             DO STUFF
          }
      }
    });
    

提交回复
热议问题