Checkbox profile field on Registration splits onto 2 lines

We've got a marketing opt-in checkbox on Registration which comes from Profile Fields. However, when it's displayed it's split over 2 lines & looks really out of place, especially next to the T&C checkbox. 

E.g.

Yet on your site you seem to have a way around this, or it's different in v12?

Parents
  • Ohh, the ones on the Verint site are built-in platform ones I'd not seen before until I looked in the Registration widget code. So unless this has received some attention in v12, I'm guessing it's the same. The label doesn't even check the box when I click on it, and the font size is different for the profile field compared to the site agreement. Sigh.

    Pretty much thinking I'll have to add some JavaScript to knock this into shape.. something like;

    var checkbox = $("input[id$='oktocontact']"); // My profile field key name
    var parentLI = checkbox.parent().parent(); // The LI containing the label + field
    var inputSpan = parentLI.find('.field-item-input'); // Input for the profile field
    var label = parentLI.find('label'); // Label for the profile field
    label.appendTo(parentLI); // Switch label so it appears last
    label.css('display', 'inline'); // Allow the label to appear on 1 line
    label.css('font-size', '14px'); // Bring in line with the other checkbox size
    label.prop('for', checkbox.prop('id')); // Link label to input, allowing it to be clicked
    inputSpan.css('display', 'inline'); // Allow the checkbox to appear on same line as label

    Or is there a better, less hacky way to make this appear nicely?

Reply
  • Ohh, the ones on the Verint site are built-in platform ones I'd not seen before until I looked in the Registration widget code. So unless this has received some attention in v12, I'm guessing it's the same. The label doesn't even check the box when I click on it, and the font size is different for the profile field compared to the site agreement. Sigh.

    Pretty much thinking I'll have to add some JavaScript to knock this into shape.. something like;

    var checkbox = $("input[id$='oktocontact']"); // My profile field key name
    var parentLI = checkbox.parent().parent(); // The LI containing the label + field
    var inputSpan = parentLI.find('.field-item-input'); // Input for the profile field
    var label = parentLI.find('label'); // Label for the profile field
    label.appendTo(parentLI); // Switch label so it appears last
    label.css('display', 'inline'); // Allow the label to appear on 1 line
    label.css('font-size', '14px'); // Bring in line with the other checkbox size
    label.prop('for', checkbox.prop('id')); // Link label to input, allowing it to be clicked
    inputSpan.css('display', 'inline'); // Allow the checkbox to appear on same line as label

    Or is there a better, less hacky way to make this appear nicely?

Children