Handling multiple radio buttons and validations
<p>I have somewhat a complex web app. I need your advice on how should I approach this situation, I can't wrap my head around this problem. Instead of explaining this complexity I have images of different scenarios.</p>

<p><img src="http://i.stack.imgur.com/vXw1g.png" alt="enter image description here"></p>

<p>As you can see, when a radio button in Add column is clicked, input fields are populated, price and description are retrieved from database. When delete is clicked, radio button is unchecked. Toggling between Add or Option button creates multiple stations, to prevent this I collect checked station names in an array and if user toggles between Add or Option, I check this array if the station exists. If it doesn't, I return true and display the station fields. </p>

<pre><code>if($.inArray($(obj).attr('data-name'), currentStations) == -1){
 currentStations.push($(obj).attr('data-name'));
  return true;
}
</code></pre>

<p>Do you think this is a right approach? How else can I handle this?</p>

<p>My other and bigger problem is that there can be multiple systems as shown below.
<img src="http://i.stack.imgur.com/JxYnL.png" alt="enter image description here">
What should I do in this case? How should I check if the station exists. Should I create multidimensional array for each systems columns? Thank you! </p>
