I have a currency input in my form.

First you select a currency (select) and then you input the value (input type number)

The input should allow only 2 decimal places in `<input type="number">` if the currency is not `JPY`. If the selected currency is `JPY` (currency by default) then no decimals are allowed.

What I've tried:

```html
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
    <div class="col-sm">
        <div class="row">
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <select  class="form-control" aria-label="Currency">
                        <option value="JPY" selected>JPY</option>
                        <option value="USD">USD</option>
                        <option value="EUR">EUR</option>
                    </select>
                </div>
                <input class="form-control" aria-label="Estimated Value" type="number" placeholder="0.00" required name="price" min="0" step="0.01" title="Estimated Value" pattern="^\d+(?:\.\d{1,2})?$">
            </div>
        </div>
    </div>
```

It works great if the currency is not JPY.

How can I do so that, if the selected currency is JPY, instead of showing that input, this other one is shown:

`<input required type="number" class="form-control" name="price" pattern="[0-9]" title="Estimated Value">`