🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Persian, RTL and Jalali Date Premium Add-on Setup Guide

Updated 11 min read Gravity Forms Fields & Inputs
On this page
  1. Video walkthrough
  2. Requirements
  3. Installation
  4. The Jalali (Solar Hijri) date field
  5. Switching it on
  6. What the visitor sees
  7. Stored as Gregorian
  8. Jalali in entries, exports, merge tags and notifications
  9. How the dates are calculated
  10. Right to left
  11. Persian and Arabic-Indic digits
  12. Iranian validators
  13. Persian font
  14. Persian translation of the form text
  15. Currencies
  16. Test it yourself
  17. Frequently asked questions
  18. Does it store Jalali dates in my entries?
  19. Does it work with the date drop down type?
  20. Can I use it on an Arabic or Urdu site?
  21. Does it send anything to an outside service?
  22. Will it break calculations?

Video walkthrough

Gravity Forms Persian RTL: Jalali Date Picker, Persian Digits & Iranian Validators
Watch: Persian right-to-left forms, Jalali dates and Iranian validators in Gravity Forms. Watch on YouTube

The Gravity Forms Persian, RTL and Jalali Date Premium Add-on localises Gravity Forms for Persian (Farsi) sites and, for the parts that are not specific to Iran, for Arabic, Urdu, Hebrew and every other right-to-left site. It gives you a Jalali (Solar Hijri) date picker, right-to-left polish, Persian or Arabic-Indic digits, validators for Iranian numbers, a bundled Persian font, a Persian translation of the form text and the Iranian Rial and Toman.

Every part is a switch or an option, so you only use what your site needs. Nothing leaves your site for any of it: the add-on makes no request to an outside service and bundles one font file family and no third-party script.

A Gravity Forms contact form in right-to-left layout with a Visit date field showing the Jalali date 1405/07/28 in Persian digits and an open calendar below it with the month Mehr 1405, Persian weekday initials starting with Saturday, Persian digits and the selected day marked
The Jalali picker: Persian month names and digits, the week starts on Saturday, Friday is red, and the field keeps working from the keyboard.

Requirements

  • WordPress 6.5 or newer and PHP 7.4 or newer (tested up to PHP 8.3).
  • Gravity Forms 2.9 or newer (tested with 2.9.8 and 3.1.2).
  • Nothing else. The Persian translation only switches on when the site language is Persian; the right-to-left polish works for any right-to-left language.

Installation

  1. Download the zip from your GravityExtra account and upload it in Plugins, Add New, Upload Plugin.
  2. Activate the plugin. Gravity Forms must be active.
  3. Go to Forms, Settings, Persian and RTL and activate your licence key.
  4. Choose your options on the same page and save.
  5. Open a date field in the form editor, switch to the Advanced tab and tick Jalali (Solar Hijri) calendar.
The add-on settings in Forms, Settings, Persian and RTL: the licence box, the right to left mode, the digits on the form, the Jalali date options, the Persian font, the translation and the currency choices
One settings page for direction, digits, Jalali output, the font, the translation and the currencies.

The Jalali (Solar Hijri) date field

The Jalali calendar is the civil calendar of Iran and Afghanistan. Visitors think in it, write it on paper forms and expect to pick it. The add-on adds it to the Date Picker type of the Gravity Forms date field.

Switching it on

  1. Open the form in the editor and click the date field.
  2. Make sure the field type is Date Picker. The Jalali option works with that type; the drop down and three-box types keep the Gregorian calendar.
  3. On the Advanced tab tick Jalali (Solar Hijri) calendar.
  4. Choose how the date is shown in entries, exports and notifications: Jalali, Jalali and Gregorian, or Gregorian only. Leave it on Use the add-on setting to follow the settings page.
  5. Save the form. We suggest the date format yyyy/mm/dd, which is how Jalali dates are written, but every Gravity Forms format works.

What the visitor sees

The field shows a calendar button. The calendar has Persian month names, Persian digits and a week that starts on Saturday, with Friday in red. A drop down for the month and one for the year, buttons for the previous and next month, a Today button and a Close button complete it. It is a dialog you can drive from the keyboard: the arrow keys move between days (the left arrow goes to the next day in this right-to-left calendar), Page Up and Page Down change the month, Home and End jump to the first and the last day, Enter chooses the day and Escape closes the calendar.

Visitors can also type the date, with Latin, Persian or Arabic-Indic digits and the separator of the field format. A date that does not exist, such as 1404/12/30 (1404 is not a leap year), is refused with a message in the form language and the visitor’s text stays in the field.

Stored as Gregorian

Gravity Forms stores every date as a Gregorian year, month and day (for example 2025-03-21). The add-on does the same, and converts the Jalali date the visitor typed before Gravity Forms validates and saves it. We chose this on purpose, because everything that reads a date keeps working: sorting and filtering the entry list, date range searches, conditional logic, the entry export, other add-ons, and your own code. You can switch the option off at any time without losing or rewriting a single entry. The Jalali text is an input and display layer only.

The conversion also happens on the server, so a visitor without JavaScript can still type a Jalali date, and a form saved with Save and Continue or sent through several pages keeps the date.

Default values are Gregorian

A default value or a prefilled value (a URL parameter, a merge tag such as the current date) is a Gregorian date, as in all Gravity Forms. The picker shows it as the matching Jalali date. For example the default value 2026-03-21 is shown as 1405/01/01.

Jalali in entries, exports, merge tags and notifications

On the entry detail page, in the entry list, in the CSV export and in notifications, the date is written the way you chose for the field. Merge tags give you the full control:

Merge tag Result for 2025-03-21
{Date:3:jalali} 1404/01/01
{Date:3:jalali_fa} ۱۴۰۴/۰۱/۰۱
{Date:3:jalali_long} 1 فروردین 1404
{Date:3:jalali_long_fa} ۱ فروردین ۱۴۰۴
{Date:3:jalali_long_en} 1 Farvardin 1404
{Date:3:jalali_full} جمعه، 1 فروردین 1404
{Date:3:jalali_full_fa} جمعه، ۱ فروردین ۱۴۰۴
{Date:3:gregorian} the date as Gravity Forms writes it
{Date:3:dmy_dash} a Gravity Forms date format modifier keeps its own output and wins
{jalali_date} today, in the site time zone, for example 1405/07/28
{jalali_date:long} today with the month name
{entry_date_jalali} the day the entry was created

A plain tag such as {Date:3} and the {all_fields} table follow the display setting of the field. In Forms, Settings, Persian and RTL you can also choose Persian or Arabic-Indic digits for these outputs and the long form with the month name. Latin digits are the default because they are the safest for spreadsheets.

The Gravity Forms entry detail page in the WordPress admin showing an entry where the Visit date is written as 1405/07/28, the Jalali date, while the entry stores the Gregorian date
The entry shows the Jalali date. The stored value is the Gregorian date, so sorting, filters and other add-ons keep working.

How the dates are calculated

The add-on uses the 33-year arithmetic rule of the Solar Hijri calendar: a year is a leap year when 25 times the year plus 11, divided by 33, leaves a remainder smaller than 8. The rule is described by Kazimierz Borkowski and is also used by the Unicode ICU Persian calendar. It agrees with the official astronomical calendar of Iran for the years 1178 to 1633, far beyond any date a form needs. The code was written for this add-on; no third-party library is included. Dates before the year 1 or after the year 3000 are refused.

Right to left

Gravity Forms already follows the page direction in many places. The add-on closes the gaps that remain on the Orbital theme and on legacy markup: alignment of labels, descriptions and messages, the progress bar (it fills from the right) and the steps, the Gregorian date picker (it opens right to left), product, quantity and total fields, list fields (the add and remove icons sit on the left), choices, the Previous and Next buttons of multi-page forms, and the calendar icon of date fields. Email, URL, phone, number and code fields are typed left to right and aligned to the start of the form, so addresses and numbers stay readable.

It also fixes a real bug of legacy markup: the hidden header row of a list field is parked far to the left of the page, which makes a right-to-left page scroll sideways for thousands of pixels. The add-on clips it instead.

Setting Where Choices
RTL polish Forms, Settings, Persian and RTL Automatic (when the site language is right to left), Always, Off
Direction of one form Form Settings, Persian and RTL Follow the add-on, Right to left, Left to right

Automatic mode looks at the site language: Persian, Arabic, Urdu, Hebrew, Pashto, Sindhi, Uyghur, Kurdish (Sorani), Dhivehi and Yiddish count as right to left, and so does any language WordPress itself marks as right to left. The add-on works the same way on Arabic and Urdu sites; only the Iranian validators and the Jalali calendar are specific to Iran and Afghanistan.

Persian and Arabic-Indic digits

In Forms, Settings, Persian and RTL choose how digits appear on the form: Latin (no change), Persian and Urdu digits (۰۱۲۳۴۵۶۷۸۹) or Arabic-Indic digits (٠١٢٣٤٥٦٧٨٩). Each form can override the choice in its own settings.

  • Text on the form (labels, descriptions, choices, messages, prices and totals) is shown with the chosen digits. The digits in the data (values, option values, prices behind the scenes) stay Latin.
  • Number fields, and text fields with an Iranian validator, show the chosen digits while the visitor types. A visitor who types Latin digits sees Persian ones, and a visitor with a Persian keyboard sees the digits they typed.
  • Fields where Gravity Forms calculates keep Latin digits while the visitor types: quantity, product price, option, shipping, total, calculated fields, number fields that appear in a calculation or in a conditional logic rule, phone and date fields. A Persian digit typed there turns into the Latin digit at once, so totals and conditional logic keep working.
  • Everything is converted to Latin digits when the form is sent, in the browser and again on the server. Number, phone, price, date and card validation therefore see Latin digits. Without JavaScript, the server does the same job.

Free text fields, such as a name or a message, keep exactly what the visitor typed.

Iranian validators

Single Line Text and Phone fields get a new option on the Advanced tab: Iranian validation. Pick one of four checks. Each one accepts Latin, Persian and Arabic-Indic digits, ignores spaces and dashes, and saves the number with Latin digits. Leave the error text of the field empty to get the default message, or write your own in the usual Custom Validation Message setting.

Validator What it checks Accepted examples
National code Ten digits, not all the same, and the check digit: the first nine digits multiplied by 10 down to 2 and added up; the remainder of the sum divided by 11 is the check digit if it is 0 or 1, otherwise the check digit is 11 minus the remainder. 1234567891, 123-456 7891, ۱۲۳۴۵۶۷۸۹۱
Mobile number A 9 followed by nine digits, with an optional 0, 98, +98 or 0098 in front. 09123456789, 9123456789, +989123456789
Sheba (IBAN) IR followed by 24 digits (26 characters), with the ISO 13616 mod 97 check. The 24 digits without IR are accepted too, and spaces are ignored. IR05 0170 0000 0012 3456 7890 12
Postal code Ten digits, the first one not 0 and not all digits the same. 1593634567, 15936-34567

What a validator cannot do

The validators check the format and the check digits. They cannot tell you whether a national code belongs to a person, whether a Sheba number belongs to an open account, or whether a postal code exists. Do not treat a passing number as proof of identity.

The sample numbers in the plugin tests are made from made-up digits and the check-digit algorithms. No real person’s identity number or account is used anywhere.

Persian font

Choose Vazirmatn in Forms, Settings, Persian and RTL, or per form. Vazirmatn is a sans-serif font for Persian, Arabic and Latin text, licensed under the SIL Open Font License 1.1. The add-on ships the Arabic and Latin subsets in two weights (regular and bold) as woff2 files, serves them from your own site and loads them only on pages with a form that uses the option. The licence text is in the OFL.txt file inside the plugin folder assets, fonts. The font files are unmodified.

Persian translation of the form text

Gravity Forms does not ship a complete Persian translation. When the site language is Persian (fa_IR), the add-on translates more than four hundred front-end strings that no installed translation covers: validation messages, buttons, sub-labels of the name, address, date and card fields, file upload text, password strength, list and repeater buttons, and the names of the countries. It also translates its own calendar and validator messages. A string that another translation already covers is left alone, so a full language pack you install later wins.

To correct or extend the translation, use the filter. The key is the English source string and the value is your text:

add_filter( 'gfxprtl_translations', function ( $map ) {
	return array_merge(
		$map,
		array(
			'Submit' => 'ثبت',
			'This field is required.' => 'پر کردن این بخش لازم است.',
		)
	);
} );

You can switch the translation off in the settings. For Arabic or Urdu sites use the same filter to supply your own strings, or install a language pack.

Currencies

The add-on adds the Iranian Rial (IRR, shown with the rial sign ﷼) and the Iranian Toman (IRT, shown as تومان) to the currency list of Gravity Forms. Both have no decimals. Choose them in Forms, Settings, Currency. Toman is not an ISO 4217 code (one toman is ten rials), so the code IRT is used only inside Gravity Forms, and payment gateways only know the rial. You can turn the currencies off in the settings.

Test it yourself

  • On a staging site set the language to Persian, add a form with a Jalali date field and a Single Line Text field with the national code validator.
  • Open the form on your phone and on a desktop. Pick a date from the calendar and type another one with Persian digits.
  • Send the form with a wrong national code to see the message, then with a right one.
  • Open the entry: the date is shown in Jalali. Export the entries and check the CSV.
  • Check the notification e-mail with a merge tag such as {Date:3:jalali_long}.

Frequently asked questions

Does it store Jalali dates in my entries?

No. Entries keep the Gregorian date, like every Gravity Forms date. The add-on converts the typed Jalali date before saving and shows Jalali in entries, exports and notifications. This keeps sorting, filters, conditional logic and other add-ons working.

Does it work with the date drop down type?

The Jalali calendar works with the Date Picker type. The drop down and the three-box types keep the Gregorian calendar, because their year list and number ranges are Gregorian.

Can I use it on an Arabic or Urdu site?

Yes. The right-to-left polish and the digit options work for every right-to-left language, with Arabic-Indic digits for Arabic and Persian or Urdu digits for Urdu. The Jalali calendar, the Iranian validators, the currencies and the bundled translation are for Persian sites.

Does it send anything to an outside service?

No. The calendar, the digits, the validators and the translation run on your server and in the visitor’s browser. The licence check and the update check talk to gravityextra.com like every GravityExtra add-on.

Will it break calculations?

No. Fields that Gravity Forms calculates keep Latin digits while the visitor types, and everything is converted to Latin digits on submit.

Install it, switch on the options you need and your Persian forms will read, look and validate like the rest of your site.

Give your Persian, Arabic and Urdu visitors forms that feel made for them

See the Persian, RTL and Jalali Date add-on

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr