<div class="round-border">
    <main style="padding:1em; display:grid; gap:1rem; grid-template-columns:repeat(3,1fr);">
        <div>
            <input type="hidden" name="InputID" id="InputID" value="<?= $inputcost->InputID ?>">
        </div>
        <div>
            <label for="Cost">Price per Kg</label>
            <input type="number" id="Cost" name="Cost" step="0.01"
                value="<?= old("Cost", esc($inputcost->Cost)) ?>">
        </div>
        <div>
            <label for="ValidFromDate">Valid From</label>
            <input type="date" name="ValidFromDate" id="ValidFromDate" value="<?= old("ValidFromDate", date_format(date_create($inputcost->ValidFromDate), 'Y-m-d')) ?>" required>
        </div>
        <div style="grid-column: 1 / SPAN 3;">

            <label for="Notes">Notes</label>
            <textarea name="Notes" id="Notes" rows="10" value="<?= old("Notes", esc($inputcost->Notes)) ?>"></textarea>
        </div>

        <div style="grid-column: 1 / SPAN 3; text-align: center;">
            <button class="button" type="submit">Save</button>

            <a class="button" href="<?= previous_url() ?>" default>Cancel</a>
        </div>
    </main>
</div>