Conditional Order Fields for WHMCS
Show or hide product custom fields on the WHMCS order form based on the client's other answers or configurable options, and require only what is shown.
What will conditional order fields do?
It lets one order form ask the right questions of each customer. On any product custom field you add a rule: show this field when another field has a certain answer, or when a configurable option is set to a certain choice. For example, Current host and cPanel username appear only when the client ticks Migrate my site, or a license key field appears only when the operating system option is Windows. Fields appear and disappear as the client answers, without a page reload.
This product is built to order: you get the license key once I have checked your account and the download within 10 business days.
What does WHMCS already do, and what does this add?
WHMCS product custom fields come in six types (text box, link, password, drop down, checkbox, text area) with a validation pattern and the settings Admin Only, Required Field, Show on Order Form and Show on Invoice. Configurable options offer drop down, radio, yes/no and quantity choices that change the price. But every field on the order form is shown to every client, and a required field is always required. The addon adds show and hide rules, and makes a field required only while it is visible.
What is included?
| Part | What you get |
|---|---|
| Conditions | Another custom field's answer, or a configurable option's choice |
| Matching | Equals, does not equal, is one of, at least or at most, with all or any conditions |
| Required when shown | A field is required only while its rule shows it |
| Server check | Rules checked again when the product is saved to the cart |
| Clean data | Answers in hidden fields are dropped before the order is saved |
| Rule editor | One page per product with its fields and rules |
Who is it for?
Hosts and service sellers whose products need different details from different clients: migrations, managed services, licenses or setup work. A long form full of questions that do not apply makes people give up or type n/a everywhere. With rules, each client sees only the questions that matter to them, and your team gets order details it can use.
What do you need, and what are the limits?
Requirements: a self-hosted WHMCS 8.13 or 9.x (I confirm your exact version at purchase), PHP 8.1 or newer, and the Standard Cart order form or a template based on it.
Limits: rules cover product custom fields on the product configuration step. Client custom fields at signup and support ticket fields are not covered, and rules do not hide configurable options themselves. Order form templates that rebuild the field markup may need a small adjustment. Admins editing a service still see every field.
It costs $49 once for a lifetime license with twelve months of updates and support and a seven-day refund window. I check each new account by hand, which can take up to 24 hours, before the license key is issued, and the download follows within 10 business days of purchase.
Key features
- Show or hide product custom fields by rule on the order form
- Conditions on other custom field answers
- Conditions on configurable option choices
- All or any matching for several conditions
- Fields required only while they are shown
- Rules checked again on the server when the product is saved
- Answers in hidden fields dropped before the order is saved
- Fields update as the client answers, without a page reload
Why customers buy this module
- →Shorter order forms with only the questions that apply
- →Fewer orders with missing or meaningless details
- →One product instead of several near-copies for each case
Frequently asked questions
What happens to a required field when it is hidden?
It is not required while hidden. You mark the field as required in its rule instead of with the WHMCS Required Field setting, and the addon then asks for an answer only when the rule shows the field. The check runs on the server as well as in the browser, so a visible required field cannot be skipped and a hidden one never blocks checkout.
Can a rule depend on a configurable option?
Yes. A rule can look at the client's choice in a drop down or radio option, whether a yes/no option is ticked, or whether a quantity option is at least or at most a number you set. You can also combine an option with another custom field's answer in the same rule.
When will I get it, and what if you can't deliver?
You get the download within 10 business days of purchase. If I do not deliver it in that time, you get a full refund. Otherwise the store's seven-day refund window applies. The license key is issued after a manual check of your account, which can take up to 24 hours.
Technical specifications
- WHMCS
- 8.13 and 9.x (confirmed at purchase)
- PHP
- 8.1+
- Order form
- Standard Cart or a template based on it
- Fields covered
- Product custom fields, all WHMCS field types
- Availability
- Built to order, delivered in 10 business days
- License
- Lifetime, 1 year of updates and support included
- Delivery
- License key after a manual account check (up to 24 hours); download when built
- Refund window
- 7 days
Related modules
IPTVSpire IPTV Storefront Theme for WHMCS
IPTVSpire turns WHMCS 9 into a complete storefront for a streaming subscription business: a TV-style homepage, plan cards with a free trial, separate features, devices and reseller pages, and a restyled login and cart. See it running on the live demo.
Cloud VPS WHMCS Theme
I built this theme for a company selling dedicated servers, VPS and cloud compute through WHMCS. It restyles every client-facing page, adds a catalog-style order form with a sign-in step, and ships a Theme Manager addon with CMS pages, a blog, menus, media and SEO settings.
Server Location Picker with Flags for WHMCS
I built this addon to manage server locations in one place. It writes them into WHMCS as a configurable option with prices in every currency, passes the chosen location code to your server module, and feeds flag cards and per-month savings to the order form.
