<?php $section = $sections['pricing_section'] ?? []; ?>

<form method="post" action="<?php echo site_url('admin/product/save_section'); ?>">
<input type="hidden" name="prd_id" value="<?php echo $product['prd_id']; ?>">
<input type="hidden" name="section_key" value="pricing_section">


<div class="form-group"><label>Section Title</label><input name="title" class="form-control" value="<?php echo $section['title'] ?? ''; ?>"></div>


<h5>Plan 1</h5>
<div class="form-group"><label>Plan Name</label><input name="plan1_name" class="form-control" value="<?php echo $section['plans'][0]['name'] ?? ''; ?>"></div>
<div class="form-group"><label>Price</label><input name="plan1_price" class="form-control" value="<?php echo $section['plans'][0]['price'] ?? ''; ?>"></div>
<div class="form-group"><label>Plan Features</label><textarea name="plan1_features" class="form-control" rows="4"><?php echo isset($section['plans'][0]['features']) ? implode("
", $section['plans'][0]['features']) : ''; ?></textarea></div>


<h5>Plan 2</h5>
<div class="form-group"><label>Plan Name</label><input name="plan2_name" class="form-control" value="<?php echo $section['plans'][1]['name'] ?? ''; ?>"></div>
<div class="form-group"><label>Price</label><input name="plan2_price" class="form-control" value="<?php echo $section['plans'][1]['price'] ?? ''; ?>"></div>
<div class="form-group"><label>Plan Features</label><textarea name="plan2_features" class="form-control" rows="4"><?php echo isset($section['plans'][1]['features']) ? implode("
", $section['plans'][1]['features']) : ''; ?></textarea></div>

<h5>Plan 3</h5>
<div class="form-group"><label>Plan Name</label><input name="plan3_name" class="form-control" value="<?php echo $section['plans'][2]['name'] ?? ''; ?>"></div>
<div class="form-group"><label>Price</label><input name="plan3_price" class="form-control" value="<?php echo $section['plans'][2]['price'] ?? ''; ?>"></div>
<div class="form-group"><label>Plan Features</label><textarea name="plan3_features" class="form-control" rows="4"><?php echo isset($section['plans'][2]['features']) ? implode("
", $section['plans'][2]['features']) : ''; ?></textarea></div>


<button class="btn btn-success">Save</button>
</form>