
A project reference can be visible in a contact form without being editable through the ordinary interface. That does not make it trustworthy. Contact Form 7 readonly fields, HTML disabled controls, and server-owned context solve different problems. Confusing them can remove a value from a notification or let a browser-supplied value influence a workflow it should not control.
This guide shows how to choose the right behavior, inspect what the browser submits, and preserve useful context. It uses official HTML references and CF7 source reviewed on October 21, 2026. The examples are illustrative and require checking against your installed version and staging setup.
Separate editing, submission and authority
For supported text controls, readonly prevents normal editing while leaving the control available for focus and form submission. A disabled control is generally excluded from normal form data and keyboard focus. MDN documents these distinct readonly and disabled behaviors. Neither attribute prevents someone from modifying a request outside the intended interface.
Decide three things independently: whether the visitor should edit the value, whether it should travel with the inquiry, and who is allowed to establish its truth. A displayed plan name can help a visitor understand context. A billable amount, permission, or account identity needs an authoritative server decision, regardless of how the page displays it.
Add a readonly CF7 text field
The CF7 text field handler explicitly reads the readonly option. A small static example in the Form tab is:
<label> Inquiry context
[text inquiry-context readonly "Website review"]
</label>
<p>This inquiry concerns a website review. Tell us below if you need another service.</p>
Use a real label and explanatory text. The field should not merely look gray, because appearance alone does not communicate whether editing is possible. If the visitor needs to choose another context, provide a clear route to the appropriate form or an editable service selection.
After saving, inspect the rendered input and confirm the readonly attribute is present. Do not infer support from the presence of an option in the editor alone. Caches, extensions and custom rendering filters can change the final HTML.
Avoid combining an uneditable empty field with a required business answer. HTML constraint validation and CF7’s own validation operate at different layers. Give the field a sensible value or redesign it so the visitor can supply what is missing, then verify the actual server response.
Do not assume disabled is a matching CF7 option
An HTML attribute and a CF7 form-tag option are different interfaces. The reviewed text handler has explicit readonly handling; do not assume adding disabled to a CF7 tag will produce an equivalent supported control. Inspect the generated DOM and the documentation for any extension responsible for disabling it.
Conditional plugins and custom scripts may disable controls while hiding a group. When that happens, the absence of a value in submitted form data can be expected browser behavior. Restoring the visual field without removing a disabled state may leave a form that looks complete but sends incomplete information.
The HTML specification’s entry-list construction rules are the reference for native submission behavior. An extension can add its own data processing, so also inspect the actual request rather than treating native rules as proof of a plugin’s complete behavior.
Inspect membership without printing personal values
On a staging page with synthetic data, select the relevant form element in browser developer tools so it is available as $0. The following read-only diagnostic checks whether a named entry appears in FormData:
const form = $0;
const field = form.querySelector('[name="inquiry-context"]');
console.table({
found: Boolean(field),
readOnly: Boolean(field?.readOnly),
disabled: Boolean(field?.disabled),
submittedEntry: new FormData(form).has('inquiry-context')
});
Select the actual form, not its outer container, before running the example. It prints presence and state rather than the answer itself. Developer tools still deserve care: avoid copying request bodies, cookies or authorization headers into tickets.
Compare the state before and after the conditional interaction that causes trouble. If the entry disappears exactly when a group becomes disabled, inspect that group’s configuration first. If it remains present but the email is blank, examine mail-tag mapping and server processing. Our mail-tag mapping guide covers that next boundary.
Keep trusted context on the server
Readonly and hidden values are both client input. Do not use them as the final authority for a recipient address, price, privileged account, or access rule. A malicious visitor can construct a different request, and an accidental stale page can carry old context even without malicious intent.
Where the server must determine context, derive it from an approved record and validate any submitted reference against the allowed relationship. A stable product identifier might select an allowed server-side record; a submitted display label should not redefine that record. Scope custom behavior to the intended form and preserve other forms’ handling.
For a fixed notification label, our server-controlled special mail-tag example presents another approach. It is useful when no user-editable field is needed. Review and test any custom implementation rather than pasting a general security rule into a theme file.
Verify the complete lead path
- Open the form logged out with synthetic context.
- Check labels, focus order, copying and explanatory wording.
- Inspect readonly and disabled states in the rendered control.
- Confirm entry presence in the actual request.
- On an isolated test setup, verify notification mapping and any stored record.
- Exercise conditional visibility and reset behavior.
- Verify that a changed client reference cannot grant unauthorized server behavior.
A passing visual check alone cannot establish correct mapping. Conversely, a missing disabled value is not necessarily an email transport failure. Record the observed boundary and change only the responsible configuration.
Once the workflow is verified, use submission trends and statistics to spot changes in overall activity. The site’s associated free plugin, Svetlik Analytics for Contact Form 7, can support that reporting task. It does not turn browser values into trusted server data or establish inbox delivery.
