I have a requirement for formatting the field where it should be of 7 digits + a space + 4 digits = 11 digits with a space in the middle. e.g. 1234567 1234.Any help will be appreciated.
Thanks,
Shobhit
Discussion posts and replies are publicly visible
You can use the like() function. Something like this seems to meet your requirements:
fn!like( ri!input, "[1-9][1-9][1-9][1-9][1-9][1-9][1-9] [1-9][1-9][1-9][1-9]" )
(note that there is a space between the first group of seven [1-9] and the last group of four [1-9]. Also note that if you want to allow a zero in either of your groupings of digits you can adjust the relevant [1-9] to [0-9] as required)
...where ri!input is a text field.
Hi Stewart,
Thanks for your reply. But, this won't format the values entered in the field as required.
Try this one.
text( "12345678901", "####### ####")