Currently, I am working on setting up a pay rate feature that includes two input boxes for numbers.
However, I am facing an issue where the input boxes are stretching too much, causing the cents field to drop down to the next line. The Maxlength property in Bootstrap seems to be getting ignored, so I am unable to control the length of the input box effectively.
<div class="form-group col-md-6">
<label for="pay_rate">Pay Rate</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">$</span>
</div>
<input type="number" name="pay_rate" id="pay_rate" class="form-control" style="text-align: right;" placeholder="0" maxlength="4" size="4">
<div class="input-group-append">
<span class="input-group-text">.</span>
</div>
<div class="input-group-append">
<input type="number" name="pay_rate" id="pay_rate" class="form-control" placeholder="00"maxlength="2" size="2">
</div>
</div>
</div>
I am brainstorming the best approach for creating a money input field that displays both the dollar sign and cents. However, I need to ensure that when the data is loaded into the SQL database, the dollar sign is not included. Any suggestions on how to achieve this?