Page 2 of 2

Re: Make font larger in form?

Posted: Fri Mar 12, 2021 5:52 pm
by Olikun
wow, such a quick answer

many thanks :)

Re: Make font larger in form?

Posted: Thu Mar 25, 2021 8:28 pm
by Olikun
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?

Re: Make font larger in form?

Posted: Fri Mar 26, 2021 1:14 am
by kev1n
Under Setup -> Header, between the Style Tags.

Re: Make font larger in form?

Posted: Sun Apr 04, 2021 10:13 am
by Olikun
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

Re: Make font larger in form?

Posted: Sun Apr 04, 2021 10:14 am
by kev1n

Code: Select all

custFieldLabelsOnTop(['single_field'], []);

Re: Make font larger in form?

Posted: Sun Apr 04, 2021 10:34 am
by Olikun
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?

Re: Make font larger in form?

Posted: Sun Apr 04, 2021 10:37 am
by kev1n
To just change the font size, add this JS in the form's Custom Code:

Code: Select all

$('#object_ID' ).css('font-size','22px');

Re: Make font larger in form?

Posted: Sun Apr 04, 2021 3:02 pm
by kev1n
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>