[Answer]-Use existing html page elements (its form and button) withing django app

1👍

This should help:

<div id="contact_form" class="col_400 float_l">
  <form id="demoForm"  name="contact" >  

     <label for="text">Your Review:</label>
     <textarea id="needid" name="needid" rows="0" cols="0" class="required"></textarea>
     <div class="cleaner_h10"></div>

     <input type="button" onclick="return Button1_onclick()" class="submit_btn float_l" name="submit" id="predictSentBtn" value="Predict" />

  </form>

 def function(request):
    if request.method = 'POST':
        print request.POST['needid'] # print request.POST.get('needid')

Try it 😉

Leave a comment