ShForm Form Builder ShForm Form Builder
  • Home 
  • Templates 
  • Integrations 
  • Plans & Pricing 
Login Sign Up
  • Integration
  • UI Widgets

Home > Help Articles > UI Widgets

Generate random numbers on input fields

  1. Adding Custom Attributes: In the field settings, you'll find an area where you can add custom attributes and their values. These attributes will define how the random number is generated for this input field. Add the following attributes:
    • Attribute Name: random-number
    • Attribute Value: yes
    This attribute tells the JavaScript code to generate a random number for this input field.
  2. Adding Number of Digits (Optional): If you want to specify the number of digits for the random number, you can do so by adding another custom attribute:
    • Attribute Name: random-number-digits
    • Attribute Value: Specify the number of digits you want for the random number. For example, if you want a 4-digit random number, set the value to 4.
    If you leave this attribute blank, the code will default to generating a 6-digit random number.
  3. Adding Prefix (Optional): If you want to add a prefix to the generated random number, you can add the following custom attribute:
    • Attribute Name: random-number-prefix
    • Attribute Value: Enter the desired prefix for the random number. For example, if you want the prefix to be "NMB," set the value to NMB.
    If you don't want to add a prefix, simply leave this attribute blank.
  4. Saving Changes: After adding the custom attributes, make sure to save the changes you've made to the field settings.

Need more help ?

Contact Support

How you ask is everything.

SIGN UP FREE

INTEGRATIONS

Google Sheets

Zapier

Salesforce

Hubspot

All apps & integrations

PRODUCT

Pricing

FAQs

Discount request

Blog

Contact us

TEMPLATES

Booking Forms

Contact Forms

Registration Forms

Appointment Forms

All Templates

GET TO KNOW US

Terms

Privacy

Refund Policy

Report Abuse

© 2024 ShForm™

[rcb-consent type=”change” tag=”a” text=”Privacy Settings”]

Cookie Settings

Privacy settings

Decide which cookies you want to allow. You can change these settings at any time. However, this can result in some functions no longer being available. For information on deleting the cookies, please consult your browser’s help function. Learn more about the cookies we use.

With the slider, you can enable or disable different types of cookies:

  • Block all
  • Essentials
  • Functionality
  • Analytics
  • Advertising

This website will

This website won\'t

  • Remember which cookies group you accepted
  • Essential: Remember your cookie permission setting
  • Essential: Allow session cookies
  • Essential: Gather information you input into a contact forms, newsletter and other forms across all pages
  • Essential: Keep track of what you input in a shopping cart
  • Essential: Authenticate that you are logged into your user account
  • Essential: Remember language version you selected
  • Functionality: Remember social media settings
  • Functionality: Remember selected region and country
  • Analytics: Keep track of your visited pages and interaction taken
  • Analytics: Keep track about your location and region based on your IP number
  • Analytics: Keep track of the time spent on each page
  • Analytics: Increase the data quality of the statistics functions
  • Advertising: Tailor information and advertising to your interests based on e.g. the content you have visited before. (Currently we do not use targeting or targeting cookies.
  • Advertising: Gather personally identifiable information such as name and location
  • Remember your login details
  • Essential: Remember your cookie permission setting
  • Essential: Allow session cookies
  • Essential: Gather information you input into a contact forms, newsletter and other forms across all pages
  • Essential: Keep track of what you input in a shopping cart
  • Essential: Authenticate that you are logged into your user account
  • Essential: Remember language version you selected
  • Functionality: Remember social media settings
  • Functionality: Remember selected region and country
  • Analytics: Keep track of your visited pages and interaction taken
  • Analytics: Keep track about your location and region based on your IP number
  • Analytics: Keep track of the time spent on each page
  • Analytics: Increase the data quality of the statistics functions
  • Advertising: Tailor information and advertising to your interests based on e.g. the content you have visited before. (Currently we do not use targeting or targeting cookies.
  • Advertising: Gather personally identifiable information such as name and location
Save & Close