Make font larger in form?

Questions related to using nuBuilder Forte.

Re: Make font larger in form?

Unread postby Olikun » Sat Mar 13, 2021 2:22 am

wow, such a quick answer

many thanks :)
Olikun
 
Posts: 48
Joined: Wed Mar 10, 2021 3:15 am
nuBuilder Version: 4.5

Re: Make font larger in form?

Unread postby Olikun » Fri Mar 26, 2021 4:58 am

kev1n wrote:
Code: Select all
input {
    font-size: 20px;
}


is this for making the text in the box bigger?

Where do I have to enter this?
Olikun
 
Posts: 48
Joined: Wed Mar 10, 2021 3:15 am
nuBuilder Version: 4.5

Re: Make font larger in form?

Unread postby kev1n » Fri Mar 26, 2021 9:44 am

Under Setup -> Header, between the Style Tags.
kev1n
nuBuilder Team
 
Posts: 1624
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Make font larger in form?

Unread postby Olikun » Sun Apr 04, 2021 5:43 pm

Hello,

I have one more question on the same subject

I use this code to make the font bigger.

It works very well

Code: Select all
// Schrift verschieben und groesser machen - START


function custFieldLabelsOnTop(f, e) {
    for (var i = 0; i < f.length; i++) {
        if (jQuery.inArray(f[i], e) == -1) {

            var t = $('#' + f[i]).cssNumber("top");
            var l = $('#' + f[i]).cssNumber("left");
            var w = $('#' + f[i]).cssNumber("width");
            $('#' + 'label_' + f[i]).css({
                'top': t - 43,
                'left': l - 10,
                'width': w + 400,
                'font-weight': 'bold',
                'font-size': '22px',
                'text-align': 'left'
            });
        }
    }
}

if (nuFormType() == 'edit') {
    var f = nuSubformObject("").fields; // include all fields of your main form.
    custFieldLabelsOnTop(f, []);
}


// Schrift verschieben und groesser machen - ENDE



But now I would like to increase the content of a single field.

Like in this picture.


How do I do that?

Image
Olikun
 
Posts: 48
Joined: Wed Mar 10, 2021 3:15 am
nuBuilder Version: 4.5

Re: Make font larger in form?

Unread postby kev1n » Sun Apr 04, 2021 5:44 pm

Code: Select all
custFieldLabelsOnTop(['single_field'], []);
kev1n
nuBuilder Team
 
Posts: 1624
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Make font larger in form?

Unread postby Olikun » Sun Apr 04, 2021 6:04 pm

kev1n wrote:
Code: Select all
custFieldLabelsOnTop(['single_field'], []);



ok, and I enter that directly in the custom code of the field?

or in the custom code of the form?

Where do I enter the font size?
Olikun
 
Posts: 48
Joined: Wed Mar 10, 2021 3:15 am
nuBuilder Version: 4.5

Re: Make font larger in form?

Unread postby kev1n » Sun Apr 04, 2021 6:07 pm

To just change the font size, add this JS in the form's Custom Code:

Code: Select all
$('#object_ID' ).css('font-size','22px');
kev1n
nuBuilder Team
 
Posts: 1624
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Make font larger in form?

Unread postby kev1n » Sun Apr 04, 2021 10:32 pm

It's also possible to change the style (size, color etc.) without JavaScript by using HTML tags in the Label.

To show the title bigger:
Code: Select all
<h2>nuBuilder</h2>


or even bigger:
Code: Select all
<h1 style=font-size:30px>nuBuilder</h1>
kev1n
nuBuilder Team
 
Posts: 1624
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Previous

Return to General

Who is online

Users browsing this forum: absalom, GlenMcCabe and 21 guests