OLD BUILDER - Random 4 digits Number
Generate a random number of 4 digits that can be used in a variable to verify a phone number, for example. Send this number to a third party app and validate your users by checking if their input matches or not, therefor validating if their phone number is real.
You can see a demo by clicking here.
To achieve this just add the following JS snippet in the Add JS (Custom scripts) option of the Advanced section of the Design tab:
const randomNumber = Math.floor((Math.random() * 9999) + 1);
// ualee_002 //
And you can display this random number using the variable we custom created: @randomnumber . Bear in mind this variable won't display in any of the variables' lists.