I'm working on adding a pre-defined country code to the input form so that it is automatically set when the user begins filling out the form.
<input class="form-control rounded-start" id="cellNumber" name="cellNumber" dmx-bind:value="value?'WHATEVER'+(value.replace(/\D/g, '')):null" placeholder="+371" data-rule-digits="">
- works just perfectly, but when I'm replacing with needed cuntry code <input class="form-control rounded-start" id="cellNumber" name="cellNumber" dmx-bind:value="value?'+371'+(value.replace(/\D/g, '')):null" placeholder="+371" data-rule-digits="">
I see this:
Also tried to be "smart" and tried this combination value?('+371').toString()+(value.replace(/\D/g, '')):null
- still no luck
Anyone?