Index of /rel/released/software/own/WP-turtle-template-form-knitter

Icon  Name                                    Last modified      Size  Description
[PARENTDIR] Parent Directory - [TXT] README.html 2026-10-29 14:20 13K Turtle Template Form Knitter [   ] turtle-template-form-knitter-1.0.10.zip 2026-10-29 14:18 19K [TXT] readme.txt 2026-10-29 14:17 2.8K [IMG] icon-256x256.png 2026-10-29 11:51 84K [TXT] doc.css 2026-10-29 11:51 3.3K [IMG] banner-772x250.png 2026-10-29 11:51 152K [TXT] example.html 2026-10-27 12:20 17K Turtle Template Form Knitter Examples [TXT] development.html 2026-10-27 12:20 18K Turtle Template Form Knitter Development
Turtle Template Form Knitter

Turtle Template Form Knitter

ver-1.0.10

This plugin "knits" together other plugins. Rather than trying to "do it all" this plugin leverages from other great plugins.

When a Contact Form 7 form is submitted, this plugin saves the uploaded image files to the Media Library. Then this plugin can create a "pending post" from a template post page. The first uploaded image is attached as the post's featured image


Install

  1. Install contact-form-7 plugin.
  2. Install flamingo plugin.
  3. Optional: Install ninja-auto-post-expire plugin
  4. If save-cf7-file-uploads is installed, delete it. It is not compatible with this plugin.
  5. Install this plugin: turtle-template-form-knitter

Development Installs

Some of these are not stable versions.

  1. Follow the Installation steps 1 to 4 above.
  2. Go to: https://moria.whyayh.com/rel/released/software/own/WP-turtle-template-form-knitter
  3. Then download the turtle-template-form-knitter-VER.zip file you want.
  4. In WordPress, install with Upload Plugin.

Usage

To use this plugin, you need to add some things to your contact-forms-7 forms. See the "Contact Form Settings" and the "Flamingo" sections.

Also, you need to create a template for your posts. See the "Template Page" section.

Uploaded images are saved for forms that have a "file" type. See "Uploaded Files" section.

If you installed ninja-auto-post-expire, the "Post" option needs to be set to "Yes" for the Post Expire Setting to be active. See: Settings -> Post Expire Settings -> Post.

Contact Form Settings

In the contact form's "Additional Settings" tab, add these settings:

create_post: true
post_template: PageSlug
skip_mail: on
do_not_store: false

This plugin does not "publish" the posts, but you should turn on reCAPTCHA in contact-form-7 settings so your admin doesn't get spammed with bot submitted "Pending" posts.

Flamingo

When do_not_store is set to true, form data will not be saved in the DB.

For the turtle-template-form-knitter plugin to work, this option needs to be set to "false", or not put in a form's "Additional Settings" tab.

You can decide if a form's data will be saved in the DB, independent of this plugin. However, you'll want to cleanup old form data. Visit Flamingo -> Inbound Messages to select the messages to be trashed. You can also trash email addresses that are no longer needed.

Flamingo documentation can be found at: https://contactform7.com/save-submitted-messages-with-flamingo/

Contact Form Page

For each contact form, you will create a page that includes the contact-form-7 block the selects the form. See Page Example

When you install a newer version of turtle-template-form-knitter, you will need to flush the browser and WordPress caches, so any JavaScript changes will be used. Or you can set your WordPress cache to not cache the form pages.

Template Page

All the blocks of the 'PageSlug' page are copied to the new post. {field} is replaced with the value of the form 'field' with that name. The field's HTML text is escaped. Also, "[" "]" is encoded so they cannot run a shortcode. Checkbox values are joined with ",". If there is no fields with that name, {field} is left as is.

Textarea fields are the exception: they can have some HTML. When HTML text is pasted into a form's textarea, it is cleaned, and the textarea shows the HTML tags that are kept. Only these tags are kept: h1, h2, h3, h4, a, p, b, strong, i, em, ul, ol, li, br. All attributes are removed, except href on "a" tags, and only for http, https, or mailto URLs. Other tags are removed (their text is kept), and script and style elements are removed with their content. The same cleaning is done again when the post is created. If a textarea value has none of the allowed tags, it is escaped like other fields.

So that the post can be edited in the block editor, a {field} with p, h1-h4, ul, or ol tags is changed to blocks: Paragraph, Heading, and List blocks. This only works when the {field} is in a Paragraph block in the template. Any text before or after the {field} in that paragraph is put in its own paragraph. In other blocks (for example a Heading), only the inline tags are kept, and the block tags are changed to line breaks.

A post's attributes are not blocks, so they are defined in the template between ATTR-BEGIN and ATTR-END lines, which are put after the Title. ATTR-BEGIN to ATTR-END and the text between them are not copied to the post; they are used to set the post's attributes. FYI, all of them are optional.

ATTR-BEGIN
title: {your-subject}
categories: {field}
tags: {field}
publish-date: {field}
expire-date: {field}
expire-time: {field}
ATTR-END

ninja-auto-post-expire only acts on posts if its "Post" option is set to "Yes" in it's settings, Post Expire Settings.

Invalid dates or times are ignored. An invalid expire-date is also shown in the error popup. See "Error Popup".

Uploaded Files

Files uploaded with the Contact Form 7 [file NAME] field are saved to the Media Library.

  1. Only image files are saved. The type is checked from the file content, and the file extension must also be an allowed image type. Other files are skipped and shown in the error popup.
  2. File names are normalized. File names can only contain letters in the set: [a-zA-Z0-9._-]. Any letters not in the set are converted to a "", and repeated "" are collapsed.
  3. Existing files are never overwritten. "_1", "_2", … is added to the base name instead.

If a post is created, the first saved image is the post's Featured Image.

Pending Posts

When a form is successfully filled out, and the "Additional Settings" are set to create a post, a "Pending" post will be created. You can now edit the post to clean it up. Mainly you'll want to delete the Notes section. If you find you are continually moving things around, you might want to change the template page for the generated posts.


Examples

Complete examples can be found at Turtle Template Form Knitter Examples


Support

Plugin bugs and documentation bugs can be filed at: Issues You can also make Feature Requests there.


For Developers

If you want to modify this plugin's code, you can find the directions at: Plugin Development


Error Popup

When Contact Form 7 form is submitted any errors in turtle-template-form-knitter will be reported in a popup. For example:

Turtle Template Form Knitter errors. Post not created.
To report, copy these errors now (they are not saved).


file type not allowed, not saved: photo.exe


invalid expire-date: "2026-13-01"

If you see an error pop-up, the submit has failed, even if a "success" message will be displayed. If you can't correct the problem, or it looks like an internal error, cut/pasted the error to your Webmaster. If the Webmaster can't fix the problem, they can file an issue (see the Support section).

The popup is not shown if:

Here is a list of all the possible errors. NAME is the uploaded file's name, PATH is where it was to be saved on the server.