tombroucke/sage-html-forms-submissions

Show HTML Forms submissions through a shortcode

1.0.1 2023-09-13 14:04 UTC

This package is auto-updated.

Last update: 2024-04-13 15:23:30 UTC


README

This package adds some functionality to the HTML Forms plugin.

Installation

You can install this package with Composer:

composer require tombroucke/sage-html-forms-submissions

Shortcodes

Show list of submissions

[sage_html_forms_submissions slug="petition" fields="name:Name"]
Attribute Description
slug The form slug for which you want to display submissions (*)
id The form id for which you want to display submissions (*)
fields Comma-separated list of fields you want to show. field_key:Label

(*) Only one is needed

Show submission count

[sage_html_forms_submissions_count slug="petition"]
Attribute Description
slug The form slug for which you want to display submissions (*)
id The form id for which you want to display submissions (*)

Extra

Add a checkbox with a name of anonymous to anonymize submissions

<div class="form-check mb-2">
  <input class="form-check-input" type="checkbox" name="anonymous" value="true" id="anonymous">
  <label class="form-check-label" for="anonymous">
    I\'d rather not have my name published
  </label>
</div>