🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 20, 2026

Gravity Forms in Persian: Jalali Dates, RTL, Persian Digits and Iranian Validators

GravityExtra
Gravity Forms in Persian: Jalali Dates, RTL, Persian Digits and Iranian Validators

If you build forms for Iranian customers, you know the small daily frictions of a form made for another language. The date picker shows a calendar nobody uses. The labels sit on the wrong side. A price is written in digits the reader has to translate in their head. A national code with one wrong digit is accepted, and the error appears three weeks later in the accounting system. None of these is hard to fix, but doing it for every form is tedious. This article walks through what changes when a Gravity Forms site is made right for Persian readers, and how the GravityExtra Persian, RTL and Jalali Date add-on does each part.

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.

Why a Jalali calendar matters

The Jalali, or Solar Hijri, calendar is the civil calendar of Iran and Afghanistan. A form that asks for a birth date, a start date, a delivery date or an appointment should let people pick the date the way they say it. The year is 1405 right now, the months are Farvardin to Esfand, and the week starts on Saturday. Asking a visitor to convert 28 Mehr 1405 into 20 October 2026 is asking for mistakes.

The tricky part is what to store. The add-on keeps the Gregorian date in the entry, exactly the value Gravity Forms stores for every date field, and converts the Jalali date the visitor picked or typed before the form is validated and saved. This is the safest choice because everything else keeps working: sorting the entry list by date, the date filters, conditional logic, exports to other systems and every other add-on that reads dates. The Jalali date is shown where people read it: on the entry page, in the entry list, in the CSV export, in notifications and in merge tags.

The calendar itself

The calendar opens from the button next to the field, or when the visitor clicks the field. It shows the Persian month names and the Persian digits, starts the week on Saturday and colours Friday red. A month drop down and a year drop down make a jump to 1370 painless, and a Today button brings the visitor back. It is built to be used without a mouse: arrow keys move between days, Page Up and Page Down change the month and Escape closes it. Visitors who prefer to type can type the date with Latin, Persian or Arabic-Indic digits. If they type a day that does not exist, such as 1404/12/30 in a year that is not a leap year, the form says so in Persian.

Under the hood the add-on uses the 33-year arithmetic rule of the Solar Hijri calendar, which agrees with the official calendar for the years 1178 to 1633. We tested it against every day from 1300 to 1500, in both directions, against an independent implementation, and against the leap years of the official calendar.

Jalali dates in notifications and exports

A confirmation e-mail that says 2026-10-20 is not a confirmation for an Iranian customer. With the add-on, the merge tag of a date field accepts modifiers. Writing the tag with jalali after the field id gives 1405/07/28, jalali_fa gives the same date with Persian digits, jalali_long gives 28 مهر 1405, and jalali_full adds the weekday, سه‌شنبه. There are also tags for today’s date and for the date the entry was created. You choose per field whether the entry, the entry list and the export show Jalali, Jalali and Gregorian together, or only Gregorian.

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.

Right to left, done properly

When the site language is Persian, WordPress switches the page direction and Gravity Forms follows in most places. The leftovers are the details people notice: a progress bar that fills from the wrong side, a calendar icon that sits on top of the text, a list field whose add and remove icons are on the wrong end, choice boxes on the wrong side of their label, a multi-page form whose buttons are in the wrong order, and a date picker that opens in the left to right layout. The add-on fixes these on the Orbital theme and on legacy markup.

One of the leftovers is a genuine bug: in legacy markup, the hidden header row of a list field is parked thousands of pixels to the left of the page, so a right-to-left page scrolls sideways for ten thousand pixels. The add-on clips it instead of moving it.

Email, website, phone and number fields are a special case: their content is typed left to right even on a right-to-left form. The add-on keeps them left to right and aligns them to the start, so an email address does not turn into a puzzle. Each form can be set to right to left, to left to right, or to follow the site.

Persian digits that do not break prices

Many Iranian readers prefer Persian digits, and a price is easier to read in them. Showing them is easy; making sure that the form still adds up is the hard part. Gravity Forms reads prices and quantities from its fields to compute a total, and its conditional logic compares what the visitor typed with a rule. If a Persian digit sits in such a field, the calculation silently fails.

The add-on shows Persian digits in the text of the form, in prices and in the total, and in number fields; but fields that Gravity Forms calculates or compares keep Latin digits while the visitor types, and a Persian digit typed there turns into the Latin one at once. When the form is sent, every digit is converted to Latin in the browser, and again on the server, so number, phone, price, date and card validation see Latin digits. Without JavaScript the server does the same. Arabic-Indic digits are available for Arabic sites.

Validators for Iranian numbers

Four common numbers have a format and a check digit, so a typo can be caught while the visitor is still on the page.

  • National code (کد ملی): ten digits, not all the same, with a check digit computed from the first nine.
  • Mobile number: a 9 and nine digits, written with or without 0, 98, +98 or 0098.
  • Sheba (the IBAN of Iran): IR and 24 digits, checked with the standard mod 97 rule.
  • Postal code: ten digits, the first not zero.

Each is an option on a Single Line Text or Phone field. Visitors can type Persian or Arabic-Indic digits, spaces and dashes; the saved value has Latin digits and no clutter. A wrong value gets a short message in Persian, which you can replace with your own. A validator checks the format and the check digits, not whether a number exists or belongs to a person, and you should not use it as proof of identity.

Font, translation and currency

Three more details finish the job. First, a font: the add-on bundles Vazirmatn, a well-made open font for Persian, Arabic and Latin text under the SIL Open Font License, and serves it from your own site only on pages with a form that uses it. Second, the words: Gravity Forms has no complete Persian translation, so a visitor sees English validation messages, English sub-labels, and an English list of countries. On a Persian site the add-on translates more than four hundred front-end strings, and leaves any string that a language pack already covers alone. A filter lets you correct any of them. Third, money: the add-on adds the Iranian Rial and the Toman to the Gravity Forms currency list, without decimals.

For Arabic and Urdu sites too

Most of this is not specific to Iran. The right-to-left polish works for any right-to-left language, and the digit option offers Arabic-Indic digits for Arabic and Persian digits for Urdu. A form on an Arabic news site or an Urdu shop gets the same alignment, progress bar, buttons and date picker fixes. Only the Jalali calendar, the Iranian validators, the currencies and the bundled Persian translation are meant for Persian sites.

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.

A short checklist

  1. Set the site language to Persian and check that the form wrapper is right to left.
  2. Switch the Jalali calendar on for each date field, with the format yyyy/mm/dd.
  3. Choose the digits and the font in the settings.
  4. Add the Iranian validators to the national code, mobile, Sheba and postal code fields.
  5. Send a test entry and read the notification, the entry and the export.

What it does not do

It does not make Gravity Forms a different product. It does not change what is stored, apart from the digits you type in numeric fields being saved as Latin digits. It does not verify identity. The Jalali picker needs the Date Picker type of the date field. And it does not send anything to an outside service: the calendar, the digits, the validators and the translation all run on your own server and in the visitor’s browser.

Frequently asked questions

Will my existing entries change?

No. Entries keep the Gregorian date. If you switch the Jalali option off, nothing is lost.

Is the Jalali conversion accurate?

It uses the 33-year arithmetic rule, which agrees with the official Iranian calendar from the year 1178 to 1633 and was tested against every day from 1300 to 1500, in both directions.

Do I need to change my theme?

No. The add-on works on the Orbital theme and on legacy markup, and a form can be switched between right to left and left to right in its settings.

With the right calendar, the right direction, the right digits and a few honest checks, a Gravity Forms form stops feeling like a translation and starts feeling like part of your Persian site.

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

See the Persian, RTL and Jalali Date add-on

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