I have a PivotTable with parcel split and would like to change the values of selects based on their predecessor, eg.
- Ifyouselectthefirstitemyouwouldlikethesubsequentitemstoassumethesamechosenshape.
- AnotherexampleIchosethefirstoneasadeposit,theotherwouldhavetobeadeposit,butifthesecondlinewastochooseaboleto,thefirstonewouldremainadepositandonlythenextoneswouldbecalledaboleto.
Isthispossible?
<table id="table_com_parcelas" class="table table-condensed table-hover table-responsive table-striped">
<thead>
<tr>
<th class="align">Parcela</th>
<th class="align">Vencimento</th>
<th class="align">Valor</th>
<th class="align">Forma pagamento</th>
</tr>
</thead>
<tbody>
<tr>
<td class="align">1 de 10</td>
<td class="align">14/10/2017</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-1"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
<tr>
<td class="align">2 de 10</td>
<td class="align">13/11/2017</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-2"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
<tr>
<td class="align">3 de 10</td>
<td class="align">13/12/2017</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-3"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
<tr>
<td class="align">4 de 10</td>
<td class="align">12/1/2018</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-4"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
<tr>
<td class="align">5 de 10</td>
<td class="align">11/2/2018</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-5"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
<tr>
<td class="align">6 de 10</td>
<td class="align">13/3/2018</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-6"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
<tr>
<td class="align">7 de 10</td>
<td class="align">12/4/2018</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-7"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
<tr>
<td class="align">8 de 10</td>
<td class="align">12/5/2018</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-8"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
<tr>
<td class="align">9 de 10</td>
<td class="align">11/6/2018</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-9"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
<tr>
<td class="align">10 de 10</td>
<td class="align">11/7/2018</td>
<td class="align">R$ 1.000,00</td>
<td class="align"><select id="select-10"><option value="1">Boleto</option><option value="2">Cartão</option><option value="3">Cheque</option><option value="4">Dinheiro</option><option value="5">Transferência</option></select></td>
</tr>
</tbody>
</table>