Configuration Options
The following documentation describes all of the possible options which can be passed to GLJ.init or set on the element as an attribute.
Initialization Configuration and Override Options
| Init Option | Form Override Attribute | Type | Required | Possible Values | Description |
|---|---|---|---|---|---|
glj-placement | String | Defaults to default | A name to give the form rendered in the specific element. | ||
baseUrl | String | Required | The base URL of the GetLinked server domain for your GetLinked instance. | ||
selector | CSS Selector | Required | The CSS selectors of the elements currently on your page which should be replaced with an instance of the form. | ||
locale | String | Defaults to en | ar, da, de, el, en, es, fi, he, is, it, ja, ko, lb, ms, nl, no, pt, sv | The locale which any text on the form should use. | |
offerName | String | Defaults to page title | The name of the offer to be reported to GetLinked | ||
offerWebsite | String | Defaults to the value of window.location.href | The website of the offer to be reported to GetLinked | ||
offerHash | String | Required | The default offer hash used for accepting registrations | ||
breakpoint | glj-breakpoint | Number | Defaults to 600 | Width at which a form will change number of fields in a row. When less than the width of the form is less than the breakpoint, any rows with 2 fields will be split into 2 rows with 1 field per row. | |
classPrefix | String | Defaults to elementor | The prefix to prepend to all relevant component classes. | ||
inputSize | glj-input-size | String | Defaults to sm | xs, sm, md, lg and xl | Defines the size of the form field components. |
inputLabel | glj-input-label | Boolean | Defaults to true | JS: true, falseHTML: 1, 0 | Controls whether field labels should be rendered above the field. |
fnameFieldCells | glj-fname-field-cells | Number | Defaults to 1 | 1, 2 | Controls how many cells out of 2 in a row should the fname field inhabit. |
lnameFieldCells | glj-lname-field-cells | Number | Defaults to 1 | 1, 2 | Controls how many cells out of 2 in a row should the lname field inhabit. |
emailFieldCells | glj-email-field-cells | Number | Defaults to 2 | 1, 2 | Controls how many cells out of 2 in a row should the email field inhabit. |
phoneFieldCells | glj-phone-field-cells | Number | Defaults to 2 | 1, 2 | Controls how many cells out of 2 in a row should the phone field inhabit. |
phoneForceMobile | Boolean | Defaults to false | true, false | Controls whether phone number validation will reject numbers which cannot be mobile numbers. | |
countryFieldCells | glj-country-field-cells | Number | Defaults to -1 | -1, 1, 2 | Controls how many cells out of 2 in a row should the country field inhabit.A value of -1 means that the country field will be rendered as part of the phone field. |
passwordFieldCells | glj-password-field-cells | Number | Defaults to 0 | 0, 1, 2 | Controls how many cells out of 2 in a row should the password field inhabit.A value of 0 will prevent the field from being shown. |
showGeneratedPasswordBeforeRedirect | Boolean | Defaults to false | true, false | Controls whether the password is shown in a dialog to the lead before redirection when passwordFieldCells = 0. | |
confirmPasswordFieldCells | glj-confirm-password-field-cells | Number | Defaults to 0 | 0, 1, 2 | Controls how many cells out of 2 in a row should the confirmPassword field inhabit.A value of 0 will prevent the field from being shown. |
tosFieldCells | glj-tos-field-cells | Number | Defaults to 2 | 0, 2 | Controls how many cells out of 2 in a row should the tos field inhabit.A value of 0 will prevent the field from being shown. |
tosDocLocation | String | When tosMustBeRead = true | The URL from which the Terms of Service can be accessed. For best results, this should be a markdown document. | ||
tosMustBeRead | Boolean | Defaults to true | true, false | Controls whether the applicant will be shown a copy of the Terms of Service before being allowed to accept that they agree to the Terms of Service. | |
privacyFieldCells | glj-privacy-field-cells | Number | Defaults to 0 | 0, 2 | Controls how many cells out of 2 in a row should the privacy field inhabit.A value of 0 will prevent the field from being shown. |
privacyDocLocation | String | When privacyMustBeRead = true | The URL from which the Privacy Policy can be accessed. For best results, this should be a markdown document. | ||
privacyMustBeRead | Boolean | Defaults to false | true, false | Controls whether the applicant will be shown a copy of the Privacy Policy before being allowed to accept that they agree to the Terms of Service. | |
recaptchaSiteKey | String | Optional | The Google ReCaptcha V3 Site Key used to ensure that submissions made are not from bots or other undesirable traffic. | ||
callToAction | glj-call-to-action | String | Defaults to callToAction.default | The text or i18n text key to be shown on the button which submits the form. | |
disclaimer | glj-disclaimer | String | Defaults to legal.disclaimer.default | The text or i18n text key to be shown as the form disclaimer. | |
localStorageEncodingType | String | Defaults to aes | base64, aes, des, rabbit, rc4, "" | The method used to encode the data stored in the local storage. See the secure-ls documentation for more information. | |
localStorageCompression | Boolean | Defaults to true | true, false | If the data in the local storage should be compressed / minified. See the secure-ls documentation for more information. | |
localStorageSecret | String | Defaults to the value of window.location.origin | The secret used for encrypting and decrypting values in the local storage. See the secure-ls documentation for more information. | ||
localStorageNamespace | String | Defaults to glj | The secure-ls namespace to be used, ensuring that values do not pollute other instances of secure-ls in use on the page.See the secure-ls documentation for more information. | ||
useMaxmindGeoIp | Boolean | Defaults to false | true, false | Controls if the MaxMind GeoIP Javascript SDK should be loaded and used for determining the IP and Country of the visitor. Should be disabled if a paid MaxMind Account has not been configured for the domain which is hosting the page. | |
sweetAlertOptions | Object | See child options | Options for customization of the feedback modals shown to the visitor. See the SweetAlert2 configuration documentation for more information. | ||
sweetAlertOptions.backdrop | Boolean or String | Whether or not SweetAlert2 should show a full screen click-to-dismiss backdrop. Can be either a Boolean or a String which will be assigned to the CSS background property.See the SweetAlert2 configuration documentation for more information. | |||
sweetAlertOptions.toast | Boolean | Defaults to false | true, false | Whether or not an alert should be treated as a toast notification. See the SweetAlert2 configuration documentation for more information. | |
sweetAlertOptions.position | String | Defaults to top-end when sweetAlertOptions.toast = trueForbidden when sweetAlertOptions.toast = false | top, top-start, top-end,center, center-start, center-end,bottom, bottom-start, bottom-end | The position of the toast. See the SweetAlert2 configuration documentation for more information. | |
sweetAlertOptions.width | String or Number | Popup window width, including paddings (box-sizing: border-box). Can be in any CSS unit ( px, em/rem, %).See the SweetAlert2 configuration documentation for more information. | |||
sweetAlertOptions.padding | String or Number | Popup window padding. Can be in any CSS unit ( px, em/rem, %).See the SweetAlert2 configuration documentation for more information. | |||
sweetAlertOptions.color | String | Text color for title, content and footer. See the SweetAlert2 configuration documentation for more information. | |||
sweetAlertOptions.background | String | Popup window background color. See the SweetAlert2 configuration documentation for more information. | |||
sweetAlertOptions.animation | Boolean | true, false | Whether to animate the popup. See the SweetAlert2 configuration documentation for more information. | ||
sweetAlertOptions.buttonsStyling | Boolean | true, false | Whether to apply default styling to buttons. See the SweetAlert2 configuration documentation for more information. | ||
sweetAlertOptions.reverseButtons | Boolean | true, false | Whether to reverse the default button order. See the SweetAlert2 configuration documentation for more information. | ||
onError | Function | Callback which is triggered when an error is encountered. See Arguments passed to the onError callback for more information. | |||
onSubmit | Function | Callback which is triggered when the submit button is pressed. See Arguments passed to the onSubmit callback for more information. | |||
onAfterSubmit | Function | Callback which is triggered after the submission is sent to the API and the response is returned. See Arguments passed to the onAfterSubmit callback for more information. | |||
onSuccess | Function | Callback which is triggered when a successful registration has occured. See Arguments passed to the onSuccess callback for more information. | |||
onFailure | Function | Callback which is triggered when an attempted registration fails. See Arguments passed to the onFailure callback for more information. | |||
delayBeforeRedirect | Number? | The amount of time in miliseconds to wait before |
Arguments passed to the onError callback
| Argument | Type | Description |
|---|---|---|
error | Error | The error which was encountered |
placement | String | The placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form. |
Arguments passed to the onSubmit callback
| Argument | Type | Description |
|---|---|---|
payload | Object | The payload which was submitted. |
payload.clickID | String | The click ID associated with the submission. |
payload.custom | String | Custom data field. |
payload.custom1 | String | Custom data field. |
payload.custom2 | String | Custom data field. |
payload.custom3 | String | Custom data field. |
payload.custom4 | String | Custom data field. |
payload.custom5 | String | Custom data field. |
payload.autoSignup | String | Internal GetLinked flag. |
payload.isTest | String | Internal GetLinked flag. |
payload.bid | String | Internal GetLinked flag. |
payload.baa | String | Internal GetLinked flag. |
payload.ip | String | IP address associated with the submission. |
payload.locale | String | Locale of the submission. |
payload.offerName | String | Name of the offer associated with the submission. |
payload.offerWebsite | String | Website of the offer associated with the submission. |
payload.offerHash | String | Hash of the offer associated with the submission. |
payload.comment | String | Comment associated with the submission. |
payload.firstName | String | First name of the submission. |
payload.lastName | String | Last name of the submission. |
payload.email | String | Email of the submission. |
payload.password | String | Password of the submission. |
payload.areaCode | String | Country code of the submission. |
payload.phone | String | Phone number of the submission. |
payload.platforms | Array<String> | Internal GetLinked flag. |
payload.excludePlatforms | Array<String> | Excluded Internal GetLinked flag. |
payload.captcha | String | Internal GetLinked flag. |
payload.captchaHash | String | Internal GetLinked flag. |
payload.customFields | Array<Object> | Internal GetLinked flag. |
placement | String | The placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form. |
Arguments passed to the onAfterSubmit callback
| Argument | Type | Description |
|---|---|---|
payload | Object | The payload which was submitted. |
payload.clickID | String | The click ID associated with the submission. |
payload.custom | String | Custom data field. |
payload.custom1 | String | Custom data field. |
payload.custom2 | String | Custom data field. |
payload.custom3 | String | Custom data field. |
payload.custom4 | String | Custom data field. |
payload.custom5 | String | Custom data field. |
payload.autoSignup | String | Internal GetLinked flag. |
payload.isTest | String | Internal GetLinked flag. |
payload.bid | String | Internal GetLinked flag. |
payload.baa | String | Internal GetLinked flag. |
payload.ip | String | IP address associated with the submission. |
payload.locale | String | Locale of the submission. |
payload.offerName | String | Name of the offer associated with the submission. |
payload.offerWebsite | String | Website of the offer associated with the submission. |
payload.offerHash | String | Hash of the offer associated with the submission. |
payload.comment | String | Comment associated with the submission. |
payload.firstName | String | First name of the submission. |
payload.lastName | String | Last name of the submission. |
payload.email | String | Email of the submission. |
payload.password | String | Password of the submission. |
payload.areaCode | String | Country code of the submission. |
payload.phone | String | Phone number of the submission. |
payload.platforms | Array<String> | Internal GetLinked flag. |
payload.excludePlatforms | Array<String> | Excluded Internal GetLinked flag. |
payload.captcha | String | Internal GetLinked flag. |
payload.captchaHash | String | Internal GetLinked flag. |
payload.customFields | Array<Object> | Internal GetLinked flag. |
response | Object | The response received after the submission. |
response.data | Object? | Data object containing details about the submission response. |
response.data.signupRequestID | String? | The ID associated with the signup request, if available. |
response.data.project | Object? | Details about the project, if available. |
response.data.project.afterSignupModalURL | String? | URL for the modal to be shown after signup, if available. |
response.data.project.details | Object? | Additional details about the project, if available. |
response.data.project.details.captchaAttempts | Number? | Number of captcha attempts made, if available. |
response.data.broker | Object? | Details about the broker, if available. |
response.data.broker.name | String? | Name of the broker, if available. |
response.data.broker.logo | String? | URL of the broker's logo, if available. |
response.data.captcha | Object? | Details about the captcha, if available. |
response.data.captcha.count | Number? | Count of captcha, if available. |
response.messages | Array<String> | Array of messages associated with the submission response. |
response.error | Object? | Error object, if the response is an error. |
response.error.code | Number? | Error code, if available. |
response.error.message | String? | Error message, if available. |
placement | String | The placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form. |
Arguments passed to the onSuccess callback
| Argument | Type | Description |
|---|---|---|
payload | Object | The payload which was submitted. |
payload.clickID | String | The click ID associated with the submission. |
payload.custom | String | Custom data field. |
payload.custom1 | String | Custom data field. |
payload.custom2 | String | Custom data field. |
payload.custom3 | String | Custom data field. |
payload.custom4 | String | Custom data field. |
payload.custom5 | String | Custom data field. |
payload.autoSignup | String | Internal GetLinked flag. |
payload.isTest | String | Internal GetLinked flag. |
payload.bid | String | Internal GetLinked flag. |
payload.baa | String | Internal GetLinked flag. |
payload.ip | String | IP address associated with the submission. |
payload.locale | String | Locale of the submission. |
payload.offerName | String | Name of the offer associated with the submission. |
payload.offerWebsite | String | Website of the offer associated with the submission. |
payload.offerHash | String | Hash of the offer associated with the submission. |
payload.comment | String | Comment associated with the submission. |
payload.firstName | String | First name of the submission. |
payload.lastName | String | Last name of the submission. |
payload.email | String | Email of the submission. |
payload.password | String | Password of the submission. |
payload.areaCode | String | Country code of the submission. |
payload.phone | String | Phone number of the submission. |
payload.platforms | Array<String> | Internal GetLinked flag. |
payload.excludePlatforms | Array<String> | Excluded Internal GetLinked flag. |
payload.captcha | String | Internal GetLinked flag. |
payload.captchaHash | String | Internal GetLinked flag. |
payload.customFields | Array<Object> | Internal GetLinked flag. |
response | Object | The success response received after the submission. |
response.data | Object? | Data object containing details about the success response. |
response.data.signupRequestID | String? | The ID associated with the signup request, if available. |
response.data.project | Object? | Details about the project, if available. |
response.data.project.afterSignupModalURL | String? | URL for the modal to be shown after signup, if available. |
response.data.project.details | Object? | Additional details about the project, if available. |
response.data.project.details.captchaAttempts | Number? | Number of captcha attempts made, if available. |
response.data.broker | Object? | Details about the broker, if available. |
response.data.broker.name | String? | Name of the broker, if available. |
response.data.broker.logo | String? | URL of the broker's logo, if available. |
response.data.captcha | Object? | Details about the captcha, if available. |
response.data.captcha.count | Number? | Count of captcha, if available. |
response.messages | Array<String> | Array of messages associated with the submission response. |
placement | String | The placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form. |
Arguments passed to the onFailure callback
| Argument | Type | Description |
|---|---|---|
payload | Object | The payload which was submitted. |
payload.clickID | String | The click ID associated with the submission. |
payload.custom | String | Custom data field. |
payload.custom1 | String | Custom data field. |
payload.custom2 | String | Custom data field. |
payload.custom3 | String | Custom data field. |
payload.custom4 | String | Custom data field. |
payload.custom5 | String | Custom data field. |
payload.autoSignup | String | Internal GetLinked flag. |
payload.isTest | String | Internal GetLinked flag. |
payload.bid | String | Internal GetLinked flag. |
payload.baa | String | Internal GetLinked flag. |
payload.ip | String | IP address associated with the submission. |
payload.locale | String | Locale of the submission. |
payload.offerName | String | Name of the offer associated with the submission. |
payload.offerWebsite | String | Website of the offer associated with the submission. |
payload.offerHash | String | Hash of the offer associated with the submission. |
payload.comment | String | Comment associated with the submission. |
payload.firstName | String | First name of the submission. |
payload.lastName | String | Last name of the submission. |
payload.email | String | Email of the submission. |
payload.password | String | Password of the submission. |
payload.areaCode | String | Country code of the submission. |
payload.phone | String | Phone number of the submission. |
payload.platforms | Array<String> | Internal GetLinked flag. |
payload.excludePlatforms | Array<String> | Excluded Internal GetLinked flag. |
payload.captcha | String | Internal GetLinked flag. |
payload.captchaHash | String | Internal GetLinked flag. |
payload.customFields | Array<Object> | Internal GetLinked flag. |
response | Object | The error response received after the submission. |
response.error | Object? | Error object containing details about the failure, if available. |
response.error.code | Number? | Error code, if available. |
response.error.message | String? | Error message, if available. |
response.messages | Array<String> | Array of messages associated with the submission failure. |
placement | String | The placement of the form from which the error was triggered. Can also be <all> when unrelated to a specific form. |