title: Building a custom _question_ in SurveyGizmo using JS - storing input data
body: <p>I've been trying to develop develop a method for eliciting preferences for an academic study using SurveyGizmo's custom question functionality. I've managed to script the html layout and basic functioning, but I'm failing at the task of storing user input data within the SurveyGizmo framework.</p>
  
  <p>The question involves making a choice between two objectives (via radio button) and then weighting the objectives against each other (via numerical text entry). I'm able to store the checked radio button, which is the best I've achieved out of everything I've tried so far.</p>
  
  <p>I've toiled on this for ages and scoured the internet looking for useful instruction with no success.</p>
  
  <p>Here is an excerpt of the html code that represents the question format:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;th align="left"&gt;Objective&lt;/th&gt;
          &lt;th align="left"&gt;Worst&lt;/th&gt;
          &lt;th align="left"&gt;Best&lt;/th&gt;
          &lt;th align="center"&gt;Select&lt;/th&gt;
          &lt;th&gt;Weight&lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;A&lt;/td&gt;
          &lt;td&gt;300&lt;name="row-1" data-col="1"&gt;&lt;/td&gt;
          &lt;td&gt;500&lt;name="row-1" data-col="2"&gt;&lt;/td&gt;
          &lt;td align="center"&gt;&lt;input id="SelectObjA-%elementid%" type="radio" value="SelectA" name="select-Q1" data-col="3"  class="sg-input sg-input-radio"&gt;&lt;/td&gt;
          &lt;td align="center"&gt;&lt;input id="WeightObjA-%elementid%" class="sg-input sg-input-text" type="text" name="WeightObjA" maxlength="3" size="3" data-col="4"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;B&lt;/td&gt;
          &lt;td&gt;9 &lt;name="row-2" data-col="1"&gt;&lt;/td&gt;
          &lt;td&gt;2 &lt;name="row-2" data-col="2"&gt;&lt;/td&gt;
          &lt;td align="center"&gt;&lt;input id="SelectObjB-%elementid%" type="radio" value="SelectB" name="select-Q1" data-col="3" class="sg-input sg-input-radio"&gt;&lt;/td&gt;
          &lt;td align="center"&gt;&lt;input id="WeightObjB-%elementid%" class="sg-input sg-input-text" type="text" name="WeightObjB" maxlength="3" size="3" data-col="4"&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>So far the only JavaScript for storing input data that works is:</p>
  
  <pre><code>{
      onload: function() {
          //Code to be executed
      },
      onsubmit: function() {
          //Code to be executed
          var select = $SG("input[name=select-Q1]:checked").val();
          this.setStorageValue(select);
      }
  }
  </code></pre>
  
  <p>I'd <em>really</em> appreciate any help in resolving the problem of how to store the user input data for all of the form fields: radio and both text inputs. </p>