Headline or caption for browse window ?

Questions related to customising nuBuilder Forte with JavaScript or PHP.

Headline or caption for browse window ?

Unread postby honza1965 » Thu Nov 18, 2021 3:57 am

Have a nice day,
I need to add a caption to each window. Is there an easy way to solve it?
Thank you for your ideas, Honz
Attachments
NuBuilder_dotaz.png
NuBuilder_dotaz.png (324.14 KiB) Viewed 71 times
honza1965
 
Posts: 13
Joined: Thu Apr 29, 2021 4:49 am
nuBuilder Version: 4.5

Re: Headline or caption for browse window ?

Unread postby kev1n » Thu Nov 18, 2021 4:11 am

Add this JavaScript in a form's custom code:

Code: Select all
function nuSetFormTitle(s, fs = 20){
   s = escape(s);
   $('#nuActionHolder').append("<span style='font-size:" + fs + "px; color:#54561d; vertical-align:middle;'>" + "&nbsp;".repeat(15) +  s + " </span>");
}

nuSetFormTitle('Hello nuBuilder ');



If you declare the above function nuSetFormTitle() under Setup -> Header, it can be used in any form.
kev1n
nuBuilder Team
 
Posts: 2145
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Headline or caption for browse window ?

Unread postby honza1965 » Thu Nov 18, 2021 4:39 am

Amazing! ! ! Thank you very much :-)
honza1965
 
Posts: 13
Joined: Thu Apr 29, 2021 4:49 am
nuBuilder Version: 4.5


Return to Custom Code

Who is online

Users browsing this forum: No registered users and 9 guests

cron