
A quantity field looks simple until someone enters a decimal, leaves it blank, or sends a value your destination cannot use. Contact Form 7 number fields work best when the question, permitted values and downstream interpretation agree. This guide shows a practical setup for quantities and estimates, followed by a small test plan you can adapt to your own form.
The examples are illustrative configurations, not results from tests performed on your website. Use a staging form and synthetic answers before changing a live lead workflow.
Start with the meaning of the answer
Write one sentence describing the field: “How many participants need a place?” is a quantity. “What is your telephone number?” is an identifier. A telephone number may contain a plus sign, spaces or a leading zero; treating it as an arithmetic value creates avoidable problems. The same distinction applies to postal codes and account references. Choose a field for the meaning of the data, rather than its appearance.
Decide whether the answer is exact or approximate. An exact number of seats should be entered precisely. An early budget estimate may be better expressed as a small set of labeled bands. Do not collect precision that the team will immediately discard. If nobody uses the number when responding, consider removing the question.
Record the unit alongside the field name. A value of 12 could mean people, hours or square meters. Keep that meaning consistent in the visible label, notification and destination property. Changing the unit later is a data migration decision, even when the form editor change takes only a minute.
Configure a bounded number field
CF7 provides number and number*; the starred version requires an answer. Its number-field documentation describes min:, max: and step: options. For an illustrative request accepting between one and twenty participants, use:
<label>Participants (1–20)
[number* participants min:1 max:20 step:1]
</label>
This example deliberately has no prefilled quantity. A visitor must supply the answer rather than accidentally accepting a convenient default. If your workflow needs a default, document why it is representative and include the untouched state in your test plan.
Use business rules to choose bounds. A limit of twenty is appropriate only if the service actually accepts twenty. Avoid copying example limits into production without checking the receiving team’s capacity. If larger requests need a different route, explain that route beside the field so an out-of-range visitor has a useful next step.
Choose decimal steps deliberately
For an estimate in hours, an illustrative field might use [number estimated-hours min:0 max:40 step:0.5]. The minimum and step jointly define the acceptable sequence. With this example, 0, 0.5 and 1 fit the sequence; 0.25 does not. Keep the label explicit about half-hour increments.
Browser constraints are useful feedback, but they are not the whole validation policy. MDN’s number-input reference explains bounds and steps, and why client-side checks cannot replace server validation. Verify the behavior of your installed CF7 version and any custom validation before trusting a receiving integration to accept every answer.
Test typing and pasting on the browsers your visitors use. If a comma decimal is rejected or interpreted unexpectedly, record the exact input and locale. Do not silently turn a rejected value into zero. Decide which formats the workflow supports and give visitors a clear example close to the control.
Use a range slider only when it suits the question
CF7 also offers range fields. A slider can suit a rough preference or estimate, but it is a poor substitute for a precise quantity when the selected value is unclear. MDN describes range inputs as controls for values where precision is less important; they also have a default value rather than a genuinely empty answer.
Before choosing a slider, decide how visitors will know the current value and unit. Test keyboard operation and the untouched state. If a visitor never moves the slider, your report should not describe its initial value as a considered preference. A conventional number input may make the intended interaction clearer with less supporting code.
Map the number into mail and the receiving record
Keep the field name stable and use its corresponding mail-tag in the notification body:
Requested participants: [participants]
Follow CF7’s mail setup guidance when adding the tag. Label the answer in the message so an operator does not have to remember the form layout. A notification with a bare “12” is much less useful than “Requested participants: 12.”
For a task, spreadsheet or CRM connection, specify the destination type and its accepted range. An optional blank answer and the number zero should remain different if they mean different things. A connector that converts both into zero loses information. Also check whether a decimal is stored as a numeric value or as text before building totals or filters.
Run a focused boundary test
Use a short worksheet with expected behavior and actual observations. Include the minimum, maximum, one value below, one above, a valid increment, an invalid increment and a blank answer. Add a normal middle value to make sure the ordinary path still works. Test optional and required fields separately.
For each accepted synthetic answer, compare the field, CF7 response, notification and destination record. For rejected answers, check whether the error explains what the visitor can correct. Use the broader Contact Form 7 testing checklist when the change affects more than this one field.
Keep this worksheet separate from business reporting. A numeric answer, an accepted submission and a qualified lead are different observations. This site publishes CF7 Analytics; its free plugin listing describes submission trends and statistics. It does not establish automatic analysis of arbitrary numeric fields. Start with one meaningful quantity, verify its mapping, then review submission trends alongside your team’s lead records.
