percent input component
About
The percent
input is a form input component for percent values. It handles scaling
values for saving them in the database:
19
becomes0.19
when submitting the form0.19
becomes19
when providing as preset value
The package @coders-tm/vue-number-format is used to scale clienside.
Example
Tne percent
input component is usually used together with form-row
.
<x-coreui::input-row
:label="trans('bc-events-presentation::product-bundle.pages.create.sections.price.labels.vat')"
required
horizontal
>
<x-coreui::in.percent
name="product[price][vat]"
/>
</x-coreui::input-row>
The above example code looks like this: