title: Multi step form - how to show data from steps before?
body: <p>Is this a good solution to check multiple radio buttons with 1 label? I have a form with multiple steps. The last step shows a summary about the previous steps and I need to get all data from there. Is there a better option? How can I get the text from the input fields and insert it to the summary? JavaScript?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('label').click(function() {
    id = this.id.split('-');
  
    if (id[0] === '1') {
      id[0] = '2';
    } else {
      id[0] = '1';
    }
  
    $('#' + id[0] + '-' + id[1]).prop('checked', true);
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="one"&gt;
    &lt;input type="radio" id="1-1" name="1-level"&gt;
    &lt;label for="1-1" id="1-1"&gt;1&lt;/label&gt;
    &lt;input type="radio" id="1-2" name="1-level"&gt;
    &lt;label for="1-2" id="1-2"&gt;2&lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="two"&gt;
    &lt;input type="radio" id="2-1" name="2-level"&gt;
    &lt;label for="2-1" id="2-1"&gt;1&lt;/label&gt;
    &lt;input type="radio" id="2-2" name="2-level"&gt;
    &lt;label for="2-2" id="2-2"&gt;2&lt;/label&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>