Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- /* Add these styles (excluding the style tags themselves) into the page custom styles section */
- .gdpr_terms { position: relative; padding-right: 35px; }
- .gdpr_terms > i { position: absolute; top: 0; right: 0; margin-top: 0; font-size: 22px; font-weight: bold; display: inline-block; vertical-align: middle; z-index: 1; }
- .kartra_page_optin_form .kartra_optin_cg .kartra_optin_gdpr_wrapper { margin-top: 0; }
- .kartra_page_optin_form .kartra_optin_gdpr_terms_popover { top: -160px; }
- .kartra_page_optin_form .kartra_optin_well-inner { max-height: 150px !important; }
- /*
- * To mix horizontal and non-horizontal forms, retain the .land-form prefix
- * and follow the procedure at https://youtu.be/Swz4xWkhCdI.
- * I'm currently recommending "land-form" (as in "landscape form") as the class
- * because it's more specific, but you can use "horizontal" as shown in the video
- * (as long as you use the same thing here, with "." in front).
- * To make all forms on the page horizontal, you can simply remove the .land-form prefix.
- */
- .land-form .kartra_optin_c1 { display: flex; flex-wrap: wrap; }
- .land-form .kartra_optin_cg { flex: 100 0; margin-right: 10px; min-width: 250px; }
- .land-form .kartra_optin_gdpr_wrapper { width: 100%; display: flex; flex-wrap: wrap; }
- .land-form .kartra_optin_cg:nth-last-of-type(1):not(.gdpr_terms) { flex: 1 1 auto; min-width: 0; }
- .land-form .kartra_optin_c1 .kartra_optin_cg button.kartra_optin_submit_btn { margin-top: 0; }
- </style>
- <script>
- /*
- * Include this script (including the script tags themselves) in the page FOOTER tracking
- * section to allow the GDPR checkboxes to display properly in horizontal (landscape) forms.
- */
- /* Implement jQuery event "after_kartra_prefill_optin" */
- (function (init) {
- var kpo;
- Object.defineProperty(window, 'kartra_prefill_optin', {
- configurable: true, enumerable: true, get () { return kpo; },
- set (f) {
- kpo = function (fh) {
- var r = f(fh);
- jQuery(window).trigger('after_kartra_prefill_optin', [ fh ]);
- return r;
- };
- }
- });
- if (init) window.kartra_prefill_optin = init;
- })(window.kartra_prefill_optin);
- (function ($) {
- var r = function () {
- $('.kartra_optin_cg .kartra_optin_gdpr_wrapper').each(function () {
- $(this).insertBefore($(this).parent());
- });
- };
- $(window).on('after_kartra_prefill_optin', r);
- $(r);
- })(jQuery);
- </script>
Add Comment
Please, Sign In to add comment