title: JSoup parsing form with checkboxes and select input
body: <p>I have a form which I have to read with jsoup, it contains several fields including checkboxes and comboboxes (select inputs).</p>
  
  <p>I am reading there values with following code - </p>
  
  <pre><code>Element campaignForm = doc.getElementById("Campaign");
              Elements allInputFields = campaignForm.getElementsByTag("input");
              Elements allSelections = campaignForm.getElementsByTag("select");                               
              Map&lt;String, String&gt; postData = new HashMap&lt;String, String&gt;();
              for(Element selectField:allSelections){
                  postData.put(selectField.attr("name"), selectField.attr("value"));
              }
  
              for(Element inputField:allInputFields){
                  if(inputField.attr("type").equalsIgnoreCase("checkbox")){
                      postData.put(inputField.attr("name"), inputField.attr("checked").equalsIgnoreCase("checked")?"1":"0");
                  }else{
                      postData.put(inputField.attr("name"), inputField.attr("value"));
                  }
              }
  </code></pre>
  
  <p>So when I print the postData Map, it gives correct values for text input fields but for checkboxes and dropdown(comboboxes) it is not working. Please let me know if there is different way to handle checkboxes and select inputs in jsoup.</p>
  
  <p><strong>EDIT:</strong> 
  Checkboxes I got working with help of comment, but select input still not working.</p>
  
  <p>Thanks in advance.</p>