Moving Calculator
Please contact Garry with any questions or comments using the information below. He looks forward to hearing from you. Thank you!
', {class : 'CustomFormField'}); Label1.html('Item Name'); var Input1 = $('', {type : 'text', name : 'field_' + (NumFields +1), id : 'm1296_field_' + (NumFields + 1), placeholder : 'Item type', "data-required" : 'true'}); Input1.on('input change', function () { $(this).attr('name', 'field_' + $(this).val()); $('label', $(this).parent()).html($(this).val()); var Row = $(this).parent().index(); var Next = $('.field:nth-child(' + (Row + 2) + ')', $('.form')); $('input', Next).attr('name', 'field_' + $(this).val() + '_amount'); }); var Col1 = $('
', { class : 'field w40'}); Col1.append(Label1); Col1.append(Input1); NumFields++; var Label2 = $('', {class : 'CustomFormField'}); Label2.html('Amount'); var input2 = $('', {type : 'number', name : 'field_' + (NumFields +1), id : 'm1296_field_' + (NumFields + 1), placeholder : 'Item Amount', "data-required" : 'true'}); input2.val(1); var Col2 = $('', { class : 'field w40'}); Col2.append(Label2); Col2.append(input2); NumFields++; var Col3 = $('', {class : 'w10'}); var Button = $('', {title: 'Remove item', class : 'FormButton'}); Button.click(function () { Col1.remove(); Col2.remove(); $(this).parent().remove(); }); Col3.append(Button); Col1.insertBefore($(this)); Col2.insertBefore($(this)); Col3.insertBefore($(this)); }); });Please contact Garry with any questions or comments using the information below. He looks forward to hearing from you. Thank you!