Hey @agelada,
The given credentials are not working. While we wait for the correct credentials, please check the suggestions below.
1. Why nothing appears on screen (The “Invisible” Validation Error)
In Cornerstone Forms, errors can be configured to display inline (Error Inline toggle):
-
How it works: When inline errors are active, Cornerstone Forms detects which input failed and attaches the error message directly next to that specific DOM field instead of rendering it in the main/global error container.
-
The hidden field conflict: If a required field is hidden by conditional logic, but the backend validation determines that the field’s conditions were not met (or fails to evaluate them properly on standard POST), the server flags that field as a missing required field.
-
The silent failure: Because inline errors are enabled, the script injects the error message next to the field inside the DOM. But because that field is hidden by conditions, the error is also hidden.
- This is why you see errors when a visible required field is empty, but see “nothing on screen” when all visible fields are filled in.
2. Standard POST Submission vs. AJAX Submission with Redirects
Your development form works because it is set to AJAX, while your production form is likely submitting as a standard POST request:
-
In AJAX mode (Dev Form):
Cornerstone submits the form in the background using JavaScript fetch(). When the server executes the Redirect Action, fetch() follows the redirect in the background, retrieves the new page HTML, and seamlessly updates the page.
-
In Non-AJAX mode (Standard POST):
The form submits natively. Cornerstone processes the form and calls WordPress’s wp_redirect() followed by exit;:
-
Headers Already Sent: In WordPress, calling
wp_redirect() during the page render phase often fails if headers or template content have already started outputting. If headers were already sent, wp_redirect() fails silently, and exit; terminates the PHP execution immediately (leaving a blank page or halting the request).
-
Redirecting to Self: If the Redirect Action’s location is blank, malformed, or points back to the current page, the browser reloads the form via a clean GET request. It appears as though the form was reset and never submitted.
-
Action Order: If the Redirect Action is placed before other actions (e.g., Save Submission, Send Email), its
exit; call will terminate PHP before those subsequent actions ever run.
3. Discrepancy Between Frontend and Backend Conditions
Cornerstone has two different condition mechanisms:
-
Cornerstone Element Conditions (native builder conditions evaluated server-side).
-
Cornerstone Forms Input Conditions (evaluated client-side via JavaScript and server-side during form processing).
If conditional fields use native Element Conditions rather than Form Input Conditions, or if the condition’s Subject references an ID rather than the exact input Name, the backend will not recognize the condition state during POST processing. The backend will treat the field as visible, see that it is empty, and fail the required check.
Recommended Checks to Resolve the Issue
-
Enable AJAX Submission (Fastest Fix):
- Select your Form element in Cornerstone.
- Under the form settings, toggle AJAX to ON (matching your development form).
-
Disable “Error Inline” to Expose Hidden Errors:
- In the Form settings, turn off Error Inline.
- Submit the form again. If a hidden conditional field is failing validation, the error will now appear in the global error container at the top or bottom of the form, identifying the exact field causing the block.
-
Verify the Redirect Action:
- Ensure the Redirect action is the last action in your form’s action stack.
- Verify the Location field contains a valid destination URL (e.g.
/thank-you/).
-
Check Conditional Field Configuration:
- Ensure all conditional fields use Input Conditions (under the form input settings), not Cornerstone’s general element conditions.
- Check that condition statements target the exact input Name of the controlling field.