Form Fields, Validation & Cascading Locations — RUTHH COD Form & Upsells
Goal and Expected Result
Section titled “Goal and Expected Result”Customize the input fields, section order, validation rules, enabled delivery countries, and cascading Country → Province → District selectors in Form Builder → Form Designer (/app/form-builder).
Preconditions
Section titled “Preconditions”- You have access to Form Builder → Form Designer (
/app/form-builder). - You know which delivery countries and address fields your courier or fulfillment workflow requires.
Numbered Instructions
Section titled “Numbered Instructions”1. Configure Enabled Delivery Countries (CountriesCard)
Section titled “1. Configure Enabled Delivery Countries (CountriesCard)”- Open Form Builder → Form Designer (
/app/form-builder). - Locate the Countries card (
FormConfiguration.countries). - Choose between single-country or multi-country mode, add the ISO country codes you ship to, and set your Default Country (
defaultCountry). - Review the country availability badges and use the direct shortcut to Shipping Rates to verify each enabled country has a matching COD delivery rate.
2. Reorder Form Sections & Toggle Field Visibility
Section titled “2. Reorder Form Sections & Toggle Field Visibility”- In the Form Elements list on the left side of Form Designer, review the structured sections (Order Summary, Shipping Rates, Customer & Delivery Fields, Upsell Blocks, and Submit Button).
- Drag or reorder form fields according to your checkout flow.
- Click any field (such as
First Name,Last Name,Phone,Email,Address,Address 2,Province / State,City / District,Postal Code, orOrder Note) to configure:- Visible: Show or hide the field on the storefront form.
- Required: Enforce both client-side and server-side required validation before order admission.
- Label & Placeholder: Customize the visible field label and helper placeholder text.
- Hide Label (
hideLabel) & Show Icon (showIcon): Configured per element rather than globally.
3. Enable Cascading Province & District Selectors
Section titled “3. Enable Cascading Province & District Selectors”- Select the Province / State and City / District fields in Form Designer.
- When the buyer’s selected delivery country has structured subdivision data (including complete 81-province and district datasets for Türkiye
TR), the storefront form automatically upgrades free-text inputs into cascading dropdown selectors:- Selecting a Country populates the Province selector.
- Selecting a Province (for example,
İstanbul) populates the corresponding District options (for example,Kadıköy,Beşiktaş,Üsküdar).
- Click Save in the SaveBar to publish the updated
cod_form.v2_snapshot.
Warnings and Edge Cases
Section titled “Warnings and Edge Cases”- Phone Validation: Phone numbers are normalized and validated on the server against the selected country code before checking fraud blocklists or creating the order.
Troubleshooting Steps
Section titled “Troubleshooting Steps”- District dropdown does not populate: Confirm that the Province / State field is enabled and visible above the City / District field, and that a supported country (such as
TR) is selected. - Buyer cannot submit the form due to a hidden field: Never mark a field as
Requiredif you have toggled its visibility to hidden; the schema validator prevents saving contradictory required+hidden field states.