Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

How do you format the name ?

Questions related to using nuBuilder Forte.
Post Reply
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

How do you format the name ?

Unread post by yvesf »

I would be interested to format the name with the first letter in uppercase and the other letters in normal : how can you do that in nuBuilder ? More generally how do you format text ? Many thanks for your help.
kev1n
nuBuilder Team
Posts: 4299
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: How do you format the name ?

Unread post by kev1n »

Hi,

To make the first letter of a text object uppercase:

Code: Select all

nuSetValue('your_object_id_here',nuGetValue('your_object_id_here').capitalise());
In general, there are a lot of functions and methods to format text. It very much depends on your needs what to use.

To format the text when a (text) input object looses focus, add an onblur event to the object with a code like

Code: Select all

nuSetValue(this.id,nuGetValue(this.id).capitalise());

E.g. see here.

https://developer.mozilla.org/en-US/doc ... formatting
https://developer.mozilla.org/en-US/doc ... xpressions
kev1n
nuBuilder Team
Posts: 4299
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: How do you format the name ?

Unread post by kev1n »

Hi Yves,

Did that help you to achieve your goal or do you need additional information?
Post Reply