I am trying to create a mobile input box with mobile number and country code separated by a divider or just the country code being fixed in the field but unable to do it.
Something like this:
(https://i.sstatic.net/6HwYdZrB.png)](https://i.sstatic.net/M6DSg36p.png)
But it doesn’t need the flag or anything extra.
This is the current code I’m working with.
<div class="form-group">
<label for="u_tel" class="control-label">Megrendelő telefonszáma:<sup>*</sup> (Kérjük NE tüntesse fel a +36/06 előhívószámot)</label>
<input type="text" value="{$user_data.u_tel}" class="form-control" id="u_tel" name="u_tel" placeholder="701234567 (Előhívószám és szóköz nélkül kérjük feltüntetni)" required data-required-error="Kérjük, adja meg a telefonszámát" minlength="8" maxlength="9">
<div class="help-block with-errors"></div>
</div>
2
Answers
I’d use something like this:
where you add a div where you can store just the country code or the country code with the flag of the country (feel free to customise it)
Here is my view, You may try something like this.