Skip to main content

Hi all, thanks for taking the time to look.


I am trying to pre fill text fields, for example adding a ‘£’ or 'e.g. 200000 'at the beginning of the field. The hope is that the consumer will know to enter a financial number.


An example: https://www.moneysupermarket.com/life-insurance/search/#/


Once the consumer has entered the number into the text field then the place holder text is removed.


Thanks,


George

Interesting!


Although I am not entirely sure how to get the ‘£’ to show up in the field, I do know how to show the form labels within the fields. Would that help?



HI Stefano,


Thanks for taking the time to look at this.


Your suggestion isn’t really what we are trying to do. The reason that we want the ‘£’ in there is so that the visitor knows to add a financial number in there, ideally we would want additional validation code in the field too so that we can ensure that they only put in numbers and perhaps a certain amount of numbers.


Ideally we would want it to look like the ‘How much cover do you need?’ field on https://www.moneysupermarket.com/life-insurance/search/#/


Thanks


George


Hi George,


You’ll need a custom validation script and a field mask to do what you are after.


Here is a community script to help you with the custom validation (I think there is an example to only accept digits).


Best,

Hristian


Sounds like you need the Placeholder script:



it’s probably implemented on most of our shared pages - so you could grab the script from there - called “Placeholders” or similar.


Reply