By Philippe on Tuesday, 19 December 2017
Posted in Technical Issues
Likes 0
Views 542
Votes 0
Hello,

Could you explain me how to use "Regexp modifier" in Joomla User Fullname Custom Field, please ?

I guess it's to automatically format a text.
For example, I would like each word to start with a capital letter, and not to allow special characters.

You can see capture in attachment.

Thank you,
Philippe
Hi Philippe,

The regexp modifier is an optional part of the pattern matching in addition to the regexp format.

There are a few modifiers available as you can see from here where the most commonly used ones include i or g:
https://www.w3schools.com/jsref/jsref_obj_regexp.asp
For example, I would like each word to start with a capital letter, and not to allow special characters.
You can set this in the regexp format setting.
·
Tuesday, 19 December 2017 13:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Raymond.

I have try, but it seem not work.

Please, could you give me the code to insert in Regexp Modifier of EasySocial, to get the format (Capital letter at the beginning of each word, without special characters, allowed numbers) ?

Maybe I must set a expression in Regexp format too (field before Regexp Modifier)...

Thank you in advance
Philippe
·
Tuesday, 19 December 2017 17:38
·
0 Likes
·
0 Votes
·
0 Comments
·
I think you should look at Regex Format instead of modifiers. Modifiers are different and the regular expression pattern to detect for upper case characters is [A-Z]

By the way, why do you want to make it so difficult for your users to register eh? If it's about cosmetics, perhaps you should use css to style it?
·
Tuesday, 19 December 2017 21:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes it's a little cosmetic I admit.
I like it when there is uniformity and consistency.

And it is precisely not to impose on users too many of rules or criteria, that the Regexp Edit is interesting.

If the user types for example: "MARK lee"
Regexp Modifier will automatically change this to : "Mark Lee".

Maybe I misunderstood and it does not help that ...


I tried this Raymond and you said. See screen capture in attachment.

But If I edit a profile, the "Save" button does not work.
I can not record, nothing happens.

Thank you,
Philippe
·
Wednesday, 20 December 2017 00:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Philippe,
If the user types for example: "MARK lee"
Regexp Modifier will automatically change this to : "Mark Lee".

The regexp format only performs validation and does not allow users to proceed if the validation fails.

As such, it does not perform any replace operations. I would say customization in the files are required if you want to perform replacements.
·
Wednesday, 20 December 2017 12:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok thank you Raymond.
I will customize files.

Philippe
·
Friday, 22 December 2017 01:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Alright Philippe. You're most welcome.

Regards.
·
Friday, 22 December 2017 10:28
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post