Cornerstone Forms Dynamic Content

Use Dynamic Content tokens to access Form data, Validation errors, Action responses, file uploads, and Nonce verification throughout your page.

  1. Form Based
  2. Actions Based
  3. File Based
  4. Nonce Based
  5. Summary

Form Based

{{dc:form:id}}

When an Element is inside a Form, you can use this to get the ID of the Form.

{{dc:form:submitted_id}}

When a Form is submitted this will get the ID of the submitted Form. It is not guaranteed to be the same ID as the {{dc:form:id}} if another Form is on the page.

{{dc:form:errors}}

This is an array of all Form errors. See Validations for how errors are generated.

{{dc:form:data key="INPUT_NAME"}}

Returns the submitted value for a specific Input by its name. For example, if your Input has a name of email, use {{dc:form:data key="email"}} to retrieve it in an Action or anywhere else on the page.

{{dc:form:number_of_submissions formID="FORM_ID"}}

Leaving the Form ID empty will result in the current Form ID in your Elements hierarchy to be used.

Actions Based

{{dc:action:response}}

Certain Actions can return data. When you have an inner Action you can utilize this data via the Dynamic Content {{dc:action:response}}

You can also go up the Action tree via the depth argument.

{{dc:action:response depth="1"}} # This would be the Action response of the parent of the last Action

File Based

{{dc:file:upload name="INPUT_NAME"}}

Returns the uploaded file data for a specific file Input by name. Use this in conjunction with the File Upload Action.

{{dc:file:all}}

This is an array of all files uploaded.

Nonce Based

Nonces help prevent unwanted spam by checking if a Form submission actually visited your page with the Form on it. See CAPTCHA & Security for more on Nonce setup.

{{dc:nonce:create action="YOUR_ACTION_NAME"}}

Whatever you use for the action argument should be used for the verify Dynamic Content.

{{dc:nonce:verify action="YOUR_ACTION_NAME" value="NONCE"}}

If you leave value blank it will use _wpnonce as its value.

Summary

Dynamic Content tokens let you access and display Form data anywhere on your page. They connect your Elements, Actions, and Validations together into a seamless workflow.

See something inaccurate? Let us know