Dieses Plugin ist nicht mit den jüngsten 3 Hauptversionen von WordPress getestet worden. Es wird möglicherweise nicht mehr gewartet oder unterstützt und kann Kompatibilitätsprobleme haben, wenn es mit neueren Versionen von WordPress verwendet wird.

Contact Form 7 Modules

Beschreibung

Ergänze verborgene Felder bei Contact Form 7

Das Plugin Contact Form 7 hat über 1 Million Downloads, dennoch fehlt dem großartigen Plugin noch eine simple Funktion: verborgene Felder. Dieses Plugin ergänzt verborgene Felder zu Contact Form 7.

Dynamische Werte einfügen

Du kannst sogar die Werte verborgener Felder dynamisch befüllen. Hierzu kann als Standardwert folgendes angegeben werden:

  • post_title: Fügt den Titel des Beitrags/der Seite hinzu
  • post_category: Die Kategorien des Beitrags/der Seite
  • post_url – Die URL des Beitrags/der Seite
  • post_author – Der Autor des Beitrags/der Seite
  • custom_field-[Name] – Der Wert eines individuellen Feldes eines Beitrags/einer Seite. Wenn Du ein individuelles Feld „Foo“ hast, würdest du custom_field-Foo als Wert für das vorborgene Formularfeld verwenden

Die folgenden Werte werden ersetzt, wenn ein Benutzer angemeldet ist:

  • user_name: Benutzername
  • user_id: ID des Benutzers
  • user_email: E-Mail-Adresse des Benutzers
  • user_display_name: Öffentlicher Name (üblicherweise der Vor- und Nachname des Benutzers)
  • user_url: Website des Benutzers

Auch eine Verwendung für benutzerdefinierte Metadaten von Benutzern ist möglich. Verwende hierzu das Format user-{field}:

  • user-aim: AIM
  • user-jabber: Jabber / Google Talk
  • user-description: Biographische Angaben

Du kannst auch einen Filter verwenden: Modifiziere den Wert eines verborgenen Feldes über einen add_filter()-Hook für den Filter wpcf7_hidden_field_value. Wenn du die ID des Eingabefeldes kennst, kannst du auch einen Hook für den Filter wpcf7_hidden_field_value_[#ID] verwenden.

Sobald dich jemand über dein Contact Form 7 Formular kontaktiert, kannst du so wesentlich mehr Informationen über seinen Besuch erhalten – und du wirst die Informationen direkt in der E-Mail sehen, mit der du kontaktiert wurdest.

Alle eingegebenen Werte einfach in einem Rutsch verschicken

Spare Zeit bei der Konfiguration der E-Mails für deine Formulare…und übersehe nie ein Feld!

Eine der Limitierungen von Contact Form 7 ist die Notwendigkeit, alle gewünschten Felder zur E-Mail hinzufügen zu müssen. Wenn also ein neues Feld in einem Formular ergänzt wird und man vergisst, es im Mail-Template hinzuzufügen, so wird es in den erhaltenen E-Mails fehlen. Dies entfällt nun..

Durch Verwendung der Erweiterung Sende alle Felder muss lediglich [all-fields] zum Mail-Template hinzugefügt werden und schon erhälst du automatisch jedes übermittelte Feld. Bei Verwendung der HTML-Formatierung schaut das Ganze auch noch gut aus.

Besuche die offizielle Pluginseite von Contact Form 7 für mehr Support & weiterführende Informationen

Screenshots

  • Generator für verborgene Formularfelder
  • Das Mail-Tag [all-fields]

Installation

  1. Upload plugin files to your plugins folder, or install using WordPress‘ built-in Add New Plugin installer
  2. Aktiviere das Plugin
  3. Edit a form in Contact Form 7
  4. Choose „Hidden field“ from the Generate Tag dropdown
  5. Follow the instructions on the page

FAQ

Installation Instructions
  1. Upload plugin files to your plugins folder, or install using WordPress‘ built-in Add New Plugin installer
  2. Aktiviere das Plugin
  3. Edit a form in Contact Form 7
  4. Choose „Hidden field“ from the Generate Tag dropdown
  5. Follow the instructions on the page
Wie deaktiviere ich die Formatierung der Schlüssel in der `[all-fields]` Ausgabe?

Ergänze das Nachfolgende in der Datei functions.php deines Themes:

add_filter('wpcf7_send_all_fields_format_key', '__return_false');
Wie verwende ich nicht zum Standard gehörige Daten eines Benutzers als Wert in einem versteckten Feld?

Beginnend mit Version 1.4 kannst Du auf die Daten eines Benutzers inklusive seiner Metadaten zugreifen.

Setze den Standardwert auf user-{meta_key}, wobei {meta_key} der Schlüssel des gewünschten Feldes aus den Metadaten ist.

Um beispielsweise die Werte der Standard-Profilfelder von WordPress zu erhalten, würde man folgendes verwenden:

  • user-aim – AOL
  • user-jabber – Jabber / Google Talk
  • user-description – Biographische Angaben
Welche Lizenz hat das Plugin?
  • Das Plugin wurde unter GPL-Lizenz veröffentlicht.
Wie kann ich leere Werte mittels des `[all-fields]` Shortcodes versenden?

Ergänze das Nachfolgende in der Datei functions.php: add_filter('wpcf7_send_all_fields_send_empty_fields', '__return_true');

Wie modifiziere ich die Ausgabe des `[all-fields]` Shortcodes?
  • wpcf7_send_all_fields_format_before – Before the loop of fields (<dl> for HTML output)
    • $value string Previous output
    • $format string Wahlweise „html“ oder „text“
  • wpcf7_send_all_fields_format_item – Change each item output. Passes four arguments:
    • $value string Previous output
    • $k string Feldbeschriftung
    • $v string Wert des Feldes
    • $format string Wahlweise „html“ oder „text“
  • wpcf7_send_all_fields_format_after – After the loop of fields (</dl> for HTML output). Passes two arguments:
    • $value string Previous output
    • $format string Wahlweise „html“ oder „text“

Rezensionen

22. August 2017
Hey there, Lovely plugin this is! Just a small tweak will make it the best, Created this tag - [hidden hidden-122 "user_email"] Which displays in mail with [hidden-122] tag How do i use that [hidden-122] tag as a mail recipient I also tried ([hidden-122]) Help me out here .
26. Oktober 2016 1 Antwort
First of all, great idea (and plugin). But two points to improve, imo: 1 - Should be core to contact form 7. 2 - Must install and keep installed two plugins in order to use one. Anyway good job guys, really!
Alle 22 Rezensionen lesen

Mitwirkende & Entwickler

„Contact Form 7 Modules“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„Contact Form 7 Modules“ wurde in 1 Sprache übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „Contact Form 7 Modules“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

2.0.1 & 2.0.2 on February 1, 2017

  • Confirmed compatibility with WordPress 4.7.2
  • Updated to work with Contact Form 7 4.6
    • Fixed: [hidden] shortcodes not being replaced in emails
    • Fixed: PHP warning related to deprecated function
  • Fixed: Removed use of deprecated get_currentuserinfo() function
  • Übersetzungen aktualisiert

2.0 on June 28, 2015

  • Requires Contact Form 7 4.2 or higher
  • Updated to work with latest Contact Form 7
  • Removed Contact Form 7 Newsletter plugin promotion

1.4.2 on March 25, 2014

  • Added: [all-fields] shortcode now skips sending data for empty fields
    • Added wpcf7_send_all_fields_send_empty_fields filter to override the setting. See the FAQ.
  • Added: [all-fields] shortcode output filters (see the FAQ item „How do I modify the output…“)
    • wpcf7_send_all_fields_format_before
    • wpcf7_send_all_fields_format_item
    • wpcf7_send_all_fields_format_after

1.4 & 1.4.1 on March 15, 2014

The below updates apply only to the Hidden Fields module.

  • Added: Support for retrieving other user data by using the field name user_{data you want}. See the FAQ „How do I set non-standard user data as hidden field values?“
  • Added: wpcf7_hidden_field_implode_glue filter. If you want to modify how arrays of data get combined into a string (default is CSV), use this filter.
  • Fixed: $post global no longer needs to be defined for user data to be successfully passed.
  • Fixed: Now supports multiple post custom_field data values, instead of only fetching one
  • Modified: Added callback function to format the hidden field instead of relying on depricated PHP
  • Modified: Improved include path for functions.php file
  • Modified: Added text to support additional localization

1.3.3

  • Hidden Fields: Fixed issue that broke the plugin with WordPress 3.8.

1.3.2

  • Hidden Fields: Fixed PHP notice caused by improper adding of script in administration
  • Hidden Fields: Fixed double inputs that were the exact same (as reported here)

1.3.1

  • Fixed: issue in Hidden Fields where the [hidden-###] shortcode no longer worked and only [post_title] format worked.
    • Added: Hidden fields now support both formats: [hidden-123] and [post_title] as long as they’re in the form itself.
  • Fixed: issue in Send All Fields where the HTML was showing as text.
  • Added wpcf7_send_all_fields_format_key filter to Send All Fields plugin to turn on or off formatting of the key (replacing example-key with Example Key in output). See „How do I turn off formatting the key in the [all-fields] output?“ in the FAQ.

1.3

  • Fixed: Hidden field now supports new Contact Form 7 format; post fields will work again.
  • Fixed: Send All Fields no longer causes spinning form submission in WordPress 3.5
  • Added: access any of the data in $post object by using the variable name. Example: You want post_modified? Use [hidden hidden-123 "post_modified"]
  • Added: If an user is logged in, you can now use user_name, user_id, user_email, user_display_name replacement values
  • Added/Improved: post_author will now return the author’s Display Name. Use post_author_id for the post author’s ID.
  • Added: Inline instructions on the Hidden field module
  • Improved: In Send All Fields, the name of the field now has dashes replaced with spaces. This will show „your name“, rather than „your-name“. Thanks, @hitolonen

1.2.2

  • Removed _wpnonce field from [all-fields] output
  • Fixed a conflict when using „Send All Fields“ module alongside „Hidden Fields“ module (as reported here)

1.2.1

  • Added support for checkboxes with Send All Fields ([all-fields])

1.2

  • Hidden fields are now displayed inside a hidden <div> instead of Contact Form 7’s default <p>. This makes hidden fields more hidden 🙂
  • Added brand-new module: Send All Fields. Allows you to add a [all-fields] tag to your email message that includes every submitted field in one tag.

1.1.1

1.1

  • Added support for using post titles as hidden fields
  • Added support for using custom field values as hidden fields
  • Added wpcf7_hidden_field_value filter to hook into using add_filter()

1.0

  • Initial plugin release.