Formulargenerator

Alles rund um Module und Plugins in CONTENIDO 4.10.
Antworten
McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Formulargenerator

Beitrag von McHubi » Di 26. Mär 2019, 20:13

Hallo allerseits,

bekannt aus der Version 4.9 (viewtopic.php?f=99&t=35231), kommt hier die Version für die 4.10. Sie ist zwar grundsätzlich identisch mit der 4.9er, kann in Zukunft aber ggf. versionsspezifische Unterschiede aufweisen. Der Ordnung halber also ein eigenes Thema für jede CONTENIDO-Version.

Wichtig: Alle "Jobs" von Folgepostings werden in den in diesem Eröffnungspost verlinkten Quelltexten berücksichtigt!

Features:
# Versand an mehrere eMail-Adressen möglich
# Editierbarer Betreff inklusive möglicher Übernahme von Datenvariablen aus dem Kontaktformular
# Spamschutz
# Festlegung der Formularfelder über den Artikelreiter Konfiguration, das sind bisher folgende Typen:
- Text
- Textarea
- eMail (inkl. Prüfung auf korrekte Mailadresse)
- Passwort (inkl. Prüfung auf bestimmte Konventionen. Da Passwortkonventionen immer recht individuell sind, ist hier z.Zt. lediglich eine Mindestanzahl Zeichen vorgegeben. Lässt sich aber ohne weiteres per reg-ex anpassen)
- Datum (inkl. Prüfung auf Datumseingabe)
- Zahl (inkl. Prüfung auf numerische Eingabe), Wertebereich definierbar
- Radio
- Checkbox
- Select single
- Select Multi
- File
- Range
- Trenner
# Dateianhang in Größe und Dateityp beschränkbar, derzeit auf einen Anhang beschränkt.
# Erläuterungstexte zu den Formularfeldern können normales html-markup enthalten (z. B. um Links zur Datenschutzerklärung einbinden zu können)
# komplett individualisierbar
# responsive
# Fehlerhinweise mit Markierung im Formular
# Einseitige und mehrseitige Formulare möglich
# HTML5-Funktionen (Validierung, Fehlermeldung, Datepicker, …) aktivierbar
# Versand als HTML und plain text über die "normale" php-Mailfunktion, per smtp kann in Modulausgabe festgelegt werden.
# Zusammenfassung der eingetragenen Daten nach Versand oder einfache Versandbestätigung

Installation
# Normales Anlegen eines neuen Moduls mit den weiter unten stehenden Inhalten
# Hinterlegen der - noch selbst zu erstellenden - drei Spamschutzsymbolen
# ggf. Anpassen der Modulausgabe am Anfang im Bereich ***** settings *****
# ggf. Umstellung von mail() auf smtp im Bereich ***** sending mail and displaying mailed data begin ***** der Modul-Ausgabe

Definition von Formularfeldern:
Gut, es gibt kein "schickes Drag'n'drop" - die Formularfelder werden pragmatisch zeilenweise im Reiter Konfiguration in einer Textarea festgelegt und an die Modul-Ausgabe übermittelt. Dort wird der Inhalt in Arrays gesplittet, die dann für den Aufbau des Formulars, der Fehlerprüfung, Bestätigungsseite und den Mailbody genutzt werden. Eine Erläuterung ist in der Modul-Eingabe vorhanden, ebenso ein fertiges Beispiel. Mag am Anfang etwas nach "Hä?!" aussehen, ist aber letztlich simpel. :wink:

SOURCEN
Da das Modul mittlerweile ordentlich umfangreich geworden ist, habe ich die einzelnen Bestandteile in eigene Posts ausgelagert:
Modul-Eingabe: viewtopic.php?f=116&t=43507&p=179644#p179644
Modul-Ausgabe: viewtopic.php?f=116&t=43507&p=179644#p179645
CSS, JavaScript und Sprache: viewtopic.php?f=116&t=43507&p=179644#p179646


CHANGELOG
13.04.2020: Für den Versand der E-Mail kann jetzt auch die seitens des Nutzers im Formular angegebene Mailadresse und der Name verwendet werden. Die per $send_from_name und $send_from_email gesetzte Konfiguration in der Modulausgabe wird überschrieben, wenn im Artikelreiter "Konfiguration" für den Namen und die Mailadresse statt des Variablennamens name und email der Variablenname send_from_name bzw. send_from_email verwendet wird.
18.09.2019: Anpassungen in der Modul-Ausgabe sorgen dafür, dass - per JavaScript - bei mehrseitigen Fomularen der Absende-Button und Spamschutz nur auf der letzten Seite angezeigt wird (bisher auf allen Seiten). Das Formular ist aber - wie bisher - auch bei deaktiviertem JS voll funktionsfähig.



Screenshots aktualisiert am 26.03.2019:
form_generator_sd_frontend_01.jpg
(66.79 KiB) Noch nie heruntergeladen
form_generator_sd_frontend_02.jpg
(49.99 KiB) Noch nie heruntergeladen
form_generator_sd_backend_01.jpg
(190.73 KiB) Noch nie heruntergeladen
Zuletzt geändert von McHubi am Mo 13. Apr 2020, 13:10, insgesamt 4-mal geändert.
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Re: Formulargenerator

Beitrag von McHubi » Di 26. Mär 2019, 20:14

Modul-Eingabe
Stand: 13.04.2020

Code: Alles auswählen

/***********************************************
* CONTENIDO MODUL - INPUT
*
* Modulname   :     form_generator_sd - Con 4.10
* Author(s)   :     Seamless-Design Markus Hübner
* Copyright   :     Markus Hübner
* Created     :     03/2019
* modified    :     09/2019: improved behaviour of form if it is a multipage one: button to send form and anti-spam will only be shown on last page
* modified    :     04/2020: added functionality for choosing send_from_name and send_from_email from information in form, if name of variable in article configuration is set to send_from_name and send_from_email
************************************************/

echo '<table>';
echo '<tr><td>'.mi18n("input recipients").'</td><td><input size="100" type="text" name="CMS_VAR[100]" value="CMS_VALUE[100]"><br/>
<small>'.mi18n("input recipients hint").' -> //test@test.de</small></td></tr>';
echo '<tr><td>'.mi18n("input email subject").'</td><td><input size="100" type="text" name="CMS_VAR[200]" value="CMS_VALUE[200]"><br/>
      <small>'.mi18n("input email subject hint").'</small></td></tr>';
echo '<tr><td>'.mi18n("input email subject variables").'</td><td><input size="100" type="text" name="CMS_VAR[210]" value="CMS_VALUE[210]"><br/>
      <small>'.mi18n("input email subject variables hint").': gender###prename###name</small></td></tr>';
echo '<tr><td>'.mi18n("input attachment allowed").'</td><td>';
      if ("CMS_VALUE[300]" != "true") {
        echo '<input type="radio" name="CMS_VAR[300]" value="true"> '.mi18n("yes");
        } else {
        echo '<input type="radio" name="CMS_VAR[300]" value="true" checked>  '.mi18n("yes");
        }
      if ("CMS_VALUE[300]" != "false") {
        echo '<input type="radio" name="CMS_VAR[300]" value="false">  '.mi18n("no");
        } else {
        echo '<input type="radio" name="CMS_VAR[300]" value="false" checked>  '.mi18n("no");
        }
echo '</td></tr>';
echo '<tr><td>'.mi18n("input filesize max").'</td><td><input size="8" type="text" name="CMS_VAR[400]" value="CMS_VALUE[400]">'.mi18n("input filesize max hint").'</td></tr>';
echo '<tr><td>'.mi18n("input anti_spam active").'</td><td>';
      if ("CMS_VALUE[500]" != "true") {
        echo '<input type="radio" name="CMS_VAR[500]" value="true"> '.mi18n("yes");
        } else {
        echo '<input type="radio" name="CMS_VAR[500]" value="true" checked> '.mi18n("yes");
        }
      if ("CMS_VALUE[500]" != "false") {
        echo '<input type="radio" name="CMS_VAR[500]" value="false"> '.mi18n("no");
        } else {
        echo '<input type="radio" name="CMS_VAR[500]" value="false" checked> '.mi18n("no");
        }
echo '</td></tr>';
echo '<tr><td>'.mi18n("input activate html5 functions").'</td><td>';
      if ("CMS_VALUE[700]" != "true") {
        echo '<input type="radio" name="CMS_VAR[700]" value="true"> '.mi18n("yes");
        } else {
        echo '<input type="radio" name="CMS_VAR[700]" value="true" checked>  '.mi18n("yes");
        }
      if ("CMS_VALUE[700]" != "false") {
        echo '<input type="radio" name="CMS_VAR[700]" value="false">  '.mi18n("no");
        } else {
        echo '<input type="radio" name="CMS_VAR[700]" value="false" checked>  '.mi18n("no");
        }
echo '</td></tr>';
echo '<tr><td>'.mi18n("input activate page step info").'</td><td>';
      if ("CMS_VALUE[800]" != "true") {
        echo '<input type="radio" name="CMS_VAR[800]" value="true"> '.mi18n("yes");
        } else {
        echo '<input type="radio" name="CMS_VAR[800]" value="true" checked>  '.mi18n("yes");
        }
      if ("CMS_VALUE[800]" != "false") {
        echo '<input type="radio" name="CMS_VAR[800]" value="false">  '.mi18n("no");
        } else {
        echo '<input type="radio" name="CMS_VAR[800]" value="false" checked>  '.mi18n("no");
        }
echo '</td></tr>';
echo '<tr><td>'.mi18n("input activate data in success note").'</td><td>';
      if ("CMS_VALUE[900]" != "true") {
        echo '<input type="radio" name="CMS_VAR[900]" value="true"> '.mi18n("yes");
        } else {
        echo '<input type="radio" name="CMS_VAR[900]" value="true" checked>  '.mi18n("yes");
        }
      if ("CMS_VALUE[900]" != "false") {
        echo '<input type="radio" name="CMS_VAR[900]" value="false">  '.mi18n("no");
        } else {
        echo '<input type="radio" name="CMS_VAR[900]" value="false" checked>  '.mi18n("no");
        }
echo '</td></tr>';
echo '<tr><td colspan="2"><b>'.mi18n("input form fields").'</b></td></tr>';
echo '<tr><td colspan="2"><textarea style="font-size: 12px;font-family: arial,helvetica,sans-serif;" cols="200" rows="20" name="CMS_VAR[600]">CMS_VALUE[600]</textarea><br/>
     '.mi18n("input please save content in case of accidentally deleting it").'</td></tr>';
echo '<tr><td colspan="2" style="background-color: #f2f2f2;">
      <span style="font-weight: 900; font-size: 1.2em;">'.mi18n("input explanations").':</span><br/>
      <b>Definition einzelner Formularfelder</b><br/>
      ###type***fieldname***mandatory***name***class***value***size***description***additional***error message<br/>
      <br/>
      <u>###:</u> trennt die Formularfelderkonfigurationen<br/>
      <u>***:</u> trennt die Konfigurationselemente<br/>
      <u>+++:</u> trennt Formularfeldauswahlmöglichkeiten (nur bei type_radio, type_checkbox, type_select_single, type_select_multi)<br/>
      <ol>
      <li><u>type:</u> type_radio, type_checkbox, type_text, type_date, type_number, type_email, type_password, type_textarea, type_select_single, type_select_multi, type_file, type_separator</li>
      <li><u>fieldname:</u> Bezeichnung des Feldes, was ausgefüllt werden soll. Bei einigen kann er durch Festlegung von "none" entfallen falls er nicht benötigt wird.</li>
      <li><u>mandatory:</u> Pflichtfeld oder nicht? Per "true" oder "false" festzulegen.</li>
      <li><u>name:</u> Generell: Name der Variable, in der die Information gespeichert werden soll. Wichtig ist, ihn nur ein einziges Mal im gesamten Formular zu vergeben! Ausnahme Dateianhang (type_file): Hier muss der Name zwingend "attachment" lauten und kann nicht frei vergeben werden.</li>
      <li><u>class:</u> Für die individuelle Gestaltung kann hier eine CSS-Klasse eingetragen werden. Ist keine gewünscht oder vorhanden, "none" eintragen.</li>
      <li><u>value:</u> Wird benötigt für type_radio, type_checkbox, type_select_single, type_select_multi. Bei allen anderen "none" verwenden. Die "Bitte wählen"-Aufforderung für type_select_single und type_select_multi muss zwingend "--- ? ---" lauten (anderenfalls Modulausgabe anpassen).</li>
      <li><u>size:</u> type_textarea: Anzahl Zeilen x Breite in Prozent (z.B. 20x90)/ type_select_single und type_select_multi: Zeilen (z.B. 5)/ type_text, type_number, type_date, type_email, type_password: Prozentangabe der Breite (z.B. 50)</li>
      <li><u>description:</u> Erläuterungen zum Formularfeld, die über dem Eingabefeld erscheinen. Wenn nicht gewünscht, "none" eintragen.</li>
      <li><u>additional:</u> type_radio und type_checkbox: "horizontal" oder "vertical", type_number: min-max (z.B. 1000|2000) oder "none", alle anderen "none", type_range und type_page_end werden weiter unten erläutert.</li>
      <li><u>error message:</u> Fehlermeldung wenn ein Pflichtfeld nicht ausgefüllt wurde bzw. eine Angabe nicht korrekt ist.</li>
      </ol>
     <ul>
     <li><u>type_file:</u> Aktuell ist nur ein Dateianhang möglich.</li>
     <li><u>type_range:</u> Wenn der Schieberegler als Pflichtfeld gesetzt wird, kann der Minimalwert der akzeptiert wird in "6. value" festgelegt werden. Mit "7. size" kann der Minimalwert, Maximalwert, Schrittweite, Startwert und die Breite des Reglers (Prozentangabe) in genau dieser Reihenfolge, getrennt mit einem "|" festgelegt werden. In "9. additional" können tickmarks gesetzt werden, was jedoch aktuell nur von wenigen Webbrowsern unterstützt wird.</li>
     <li><u>type_page_begin:</u> Mit "2. fieldname" kann eine Seitenüberschrift festgelegt werden und unter "6. value" wird die Seitennummer vergeben. Letzteres ist zwingend notwendig und muss mit ganzen Zahlen erfolgen (1,2,3,...,10,11,...).</li>
     <li><u>type_page_end:</u> Jede Seite braucht einen Anfang und auch das Ende muss definiert werden. Unter "6. value" wird wieder die Seitennummer aus type_page_begin eingetragen. Unter "8. additional" wird die Beschriftung für die zurück- und weiter-Buttons festgelegt, getrennt mit einem "|". Da auf Seite 1 kein zurück-Schritt möglich ist, wird als Beschriftung "-" eingetragen. Der Button wird daraufhin nicht dargestellt. Ähnliches gilt für die letzte Formularseite, wo es keinen weiter-Button geben darf. Buttonbeschriftungen sehen für ein dreiseitiges Formular so aus: 1. "-|weiter", 2. "zurück|weiter", 3. "zurück|-".</li>
      </ul>
     <br/>
     <b>'.mi18n("input examples").'</b>
     <div style="border: 1px solid #999999;">
     ###type_page_begin***Seitentitel***false***none***none***1***none***none***none***none<br/>
###type_radio***Anrede***true***gender***none***Herr***none***Herr***vertical***Bitte teilen Sie Ihre Anrede mit.<br/>
+++type_radio***Anrede***true***gender***none***Frau***none***Frau***vertical***Bitte teilen Sie Ihre Anrede mit.<br/>
###type_checkbox***Wetter***true***sonne***none***Sonne scheint***none***Sonne scheint***vertical***Bitte sagen Sie, dass die Sonne scheint.<br/>
+++type_checkbox***Wetter***true***wind***none***Wind weht ein wenig***none***Wind weht ein wenig***vertical***Bitte sagen Sie, dass der Wind weht.<br/>
###type_page_end***none***false***none***none***1***none***none***-|weiter***none<br/>
###type_page_begin***Seitentitel***false***none***none***2***none***none***none***none<br/>
###type_text***Name***true***name***text***none***none***none***none***Bitte tragen Sie Ihren Namen ein.<br/>
###type_date***Datum***true***datum***text***none***20***none***none***Bitte tragen Sie ein korrektes Datum ein.<br/>
###type_email***E-Mail***true***email***text***none***none***none***none***Bitte tragen Sie eine korrekte E-Mail Adresse ein.<br/>
###type_password***Passwort***true***password***text***none***none***none***none***Bitte tragen Sie ein korrektes Passwort, dass den Kriterien ... entspricht ein.<br/>
###type_number***Postleitzahl***true***plz***text***none***30***none***1000|99999***Bitte geben Sie eine korrekte Postleitzahl ein.<br/>
###type_page_end***none***false***none***none***2***none***none***zurück|weiter***none<br/>
###type_page_begin***Seitentitel***false***none***none***3***none***none***none***none<br/>
###type_textarea***Nachricht***true***message***textarea***none***10x90***Lorem ipsum dolor...***none***Bitte tragen Sie eine Nachricht ein.<br/>
###type_separator***Text für Trenner***false***none***none***none***none***none***none***none<br/>
###type_select_single***Essen***true***essen***none***--- ? ---***3***Ihre Auswahl?***none***Bitte wählen Sie ein Essen aus.<br/>
+++type_select_single***Essen***true***essen***none***Pizza***3***Ihre Auswahl?***none***Bitte wählen Sie ein Essen aus.<br/>
+++type_select_single***Essen***true***essen***none***Salat***3***Ihre Auswahl?***none***Bitte wählen Sie ein Essen aus.<br/>
+++type_select_single***Essen***true***essen***none***Nudeln***3***Ihre Auswahl?***none***Bitte wählen Sie ein Essen aus.<br/>
+++type_select_single***Essen***true***essen***none***Schnitzel***3***Ihre Auswahl?***none***Bitte wählen Sie ein Essen aus.<br/>
+++type_select_single***Essen***true***essen***none***Würstchen***3***Ihre Auswahl?***none***Bitte wählen Sie ein Essen aus.<br/>
###type_select_multi***Getränke***true***getraenke***none***--- ? ---***3***Ihre Auswahl?***none***Bitte wählen Sie ein Getränk aus.<br/>
+++type_select_multi***Getränke***true***getraenke***none***Wasser***3***Ihre Auswahl?***none***Bitte wählen Sie ein Getränk aus.<br/>
+++type_select_multi***Getränke***true***getraenke***none***Cola***3***Ihre Auswahl?***none***Bitte wählen Sie ein Getränk aus.<br/>
+++type_select_multi***Getränke***true***getraenke***none***Fanta***3***Ihre Auswahl?***none***Bitte wählen Sie ein Getränk aus.<br/>
+++type_select_multi***Getränke***true***getraenke***none***Wein***3***Ihre Auswahl?***none***Bitte wählen Sie ein Getränk aus.<br/>
###type_file***Dateianhang***true***attachment***none***none***none***(max. 200 kb)***none***Bitte laden Sie eine Datei hoch.<br/>
###type_range***Schieberegler***true***schieberegler***none***1***0|5|1|0|80***none***0|1|2|3|4|5***Bitte wählen Sie einen Wert größer als 0 aus.<br/>
###type_page_end***none***false***none***none***3***none***none***zurück|-***none
     </div>
      </td></tr>';
echo '</table>';
Zuletzt geändert von McHubi am Mo 13. Apr 2020, 13:16, insgesamt 4-mal geändert.
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Re: Formulargenerator

Beitrag von McHubi » Di 26. Mär 2019, 20:15

Modul-Ausgabe
Stand: 13.04.2020

Code: Alles auswählen

<?php

/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname   :     form_generator_sd - Con 4.10
* Author(s)   :     Seamless-Design Markus Hübner
* Copyright   :     Markus Hübner
* Created     :     03/2019
* modified    :     09/2019: improved behaviour of form if it is a multipage one: button to send form and anti-spam will only be shown on last page
* modified    :     04/2020: added functionality for choosing send_from_name and send_from_email from information in form, if name of variable in article configuration is set to send_from_name and send_from_email
************************************************/

/*
######## README ######## 
# fieldtypes:
if you want to add new fieldtypes, you will have to look at ########## checking for errors begin ########## and  ########## displaying form begin ##########
# sending mails:
some hosters don't allow sending mails with "from-adresses" that are not located on the same server to provide spam. in this case, make your changes in variable $send_from_name and $send_from_email within settings
# smtp
if you want to use smtp as sendmethod instead of mail(), you have to set $use_smtp="true"; within settings. contenido then will check for the information within the "mailserver"-section you'll find in contenido backend via "administration -> system -> configuration". ask your provider for the needed data. at the current state of development, the entered data for the name and email of the sender is not read. therefor you'll have to fill in this information within the settings section of this module!
# send_from_name and send_from_email
for sending the email normally the data you set via $send_from_name and $send_from_email at the beginning of the settings-section in module output will be taken. if you prefer that the information that is given within form from your users is taken, you just have to change the name for the variables in article configuration tab from name to send_from_name and email to send_from_email. please be aware, that not all providers allow to use this option due to spam protection.
########################
*/


/********** settings begin **********/

$send_from_name=""; // if this is set to =""; the original name entered in form by the user will be taken
$send_from_email=""; // if this is set to =""; the original mail-address entered in form by the user will be taken
$use_smtp="true"; // set to "false" to use old mail()-function. 
$content_type="text/html"; // 'text/html' or 'text/plain' - only used when $use_smtp is set to "true"

$attachment_allowed="CMS_VALUE[300]";
$html5_functions="CMS_VALUE[700]";
$show_page_steps="CMS_VALUE[800]";
$show_data_in_success_note="CMS_VALUE[900]";
$separator_page_step_info=mi18n("output separator page step info");
/*
jpg: jpg
jpeg: jpeg
bmp: bmp
zip: octet-stream
doc: msword
docx: vnd.openxmlformats-officedocument.wordprocessingml.document
xls: plain
xlsx: vnd.openxmlformats-officedocument.spreadsheetml.sheet
*/
$array_allowed_filetypes=array('jpg','jpeg','gif','png','bmp','pdf','octet-stream','doc','plain');
$array_allowed_filetypes_hint=array('jpg','jpeg','gif','png','bmp','pdf','zip','doc','xls');
$allowed_filetypes_hint_form="";
foreach($array_allowed_filetypes_hint AS $element) $allowed_filetypes_hint_form.='<span class="allowed_filetypes">'.$element.'</span> ';
$filesize_max="CMS_VALUE[400]"*1;
$max_attach_size_hint=$filesize_max/1000000;
$anti_spam="CMS_VALUE[500]";
$amount_countchas=8;
$countcha_1="upload/module/form_generator_sd/countcha_1.png";
$countcha_2="upload/module/form_generator_sd/countcha_2.png";
$countcha_3="upload/module/form_generator_sd/countcha_3.png";
$name_countcha_1=mi18n("output form countcha 1 name");
$name_countcha_2=mi18n("output form countcha 2 name");
$name_countcha_3=mi18n("output form countcha 3 name");
$placeholder_select_something="--- ? ---";
$arr_search=array('ä','ö','ü','Ä','Ö','Ü','ß');
$arr_replace=array('&auml;','&ouml;','&uuml;','&Auml;','&Ouml;','&Uuml;','&szlig;');
/********** settings end **********/ 

/*
###0 type***1 fieldname***2 mandatory***3 name***4 class***5 value***6 size***7 beschreibung***8 additional***9 error message
maximum 1 attachment possible, name hast to be "attachment"
*/
$fields="CMS_VALUE[600]";
 

echo '<a name="startform"></a>';

$form_submitted=htmlspecialchars(strip_tags($_POST['form_submitted']));

$array_fields=explode('###',$fields);
unset($array_fields[0]);
//print_r($array_fields);

$array_field_names=array();
$array_field_names_mail_body_success_info=array();
$amount_of_pages=0;
$array_considered_form_fields=array();
foreach($array_fields AS $field)
  {
  $array_field_parts=explode('+++',$field);
  foreach($array_field_parts AS $part)
    {
   $array_field_parts_elements=explode('***',$part);
   if($array_field_parts_elements[0]=="type_page_begin") $amount_of_pages++;
   //0: type / 1: fieldname / 2: mandatory / 3: name / 4: class / 5: value / 6: size / 7: description / 8: additional / 9: error message
   if(!in_array($array_field_parts_elements[3],$array_considered_form_fields) OR $array_field_parts_elements[3]=="none")
   {
   $array_considered_form_fields[]=$array_field_parts_elements[3];
      $array_field_names[]=array($array_field_parts_elements[3],$array_field_parts_elements[0],$array_field_parts_elements[2],$array_field_parts_elements[9],$array_field_parts_elements[1],$array_field_parts_elements[8],$array_field_parts_elements[5]);
   $array_field_names_mail_body_success_info[]=$array_field_parts_elements[1];
   }
   }
  }
$field_content_counter=1;



if($form_submitted!="")
  {
/*########## checking for errors begin ##########*/
$mail_body='<table>';
$mail_body_plain_text="";
$success_info='<div class="box_success_info">';
$i=1;
$amount_of_fields=count($array_field_names);

foreach($array_field_names AS $field)
  {
/* formatting and adding data for mail_body and success_info after sending form successfully begin */
  if(is_array($_POST[$field[0]]))
    {
    ${'value_'.$field[0]}=$_POST[$field[0]];
    if(${'value_'.$field[0]}[0]==$placeholder_select_something) ${'value_'.$field[0]}="";
    $array_temp=array();
    foreach(${'value_'.$field[0]} AS $element) $array_temp[]=htmlspecialchars(strip_tags($element));
    ${'value_'.$field[0]}=$array_temp;
    }
    else ${'value_'.$field[0]}=htmlspecialchars(strip_tags($_POST[$field[0]]));
  if(${'value_'.$field[0]}==$placeholder_select_something) ${'value_'.$field[0]}="";
  if(is_array(${'value_'.$field[0]}))
    {
    $field_value="";
    foreach(${'value_'.$field[0]} AS $field_value_part) $field_value.="*&nbsp;".$field_value_part.'<br/>';
    }
    else $field_value=str_replace($arr_search,$arr_replace,${'value_'.$field[0]});
  if($field[1]=="type_file")
    {
	$field_value=$_FILES[$field[0]]['name'];
	}
  if(${'value_'.$field[0]}!="" OR $field[1]=="type_file")
    {
    $mail_body.='<tr><td><b>'.str_replace($arr_search,$arr_replace,$field[4]).'</b></td><td>'.nl2br($field_value).'</td></tr>';
	$mail_body_plain_text.=str_replace($arr_search,$arr_replace,$field[4]).': '.nl2br($field_value).'\r\n';
    if($field[1]=="type_password") $field_value='*********';
    $success_info.='<div class="box_success_info_row"><div';
    if($i==1) $success_info.=' class="box_success_info_row_s1_z1_ueb"';
    if($i!=1 AND $i<$amount_of_fields) $success_info.=' class="box_success_info_row_s1_zx_ueb"';
    if($i==$amount_of_fields) $success_info.=' class="box_success_info_row_s1_zende_ueb"';
    $success_info.='>'.str_replace($arr_search,$arr_replace,$field[4]).'</div><div class="box_success_info_data">'.nl2br($field_value).'</div></div>';
    }
  if($field[1]=="type_separator")
    {
    $mail_body.='<tr><td colspan="2"><b>'.str_replace($arr_search,$arr_replace,$field[4]).'</b></td></tr>';
    $mail_body_plain_text.='\r\n'.str_replace($arr_search,$arr_replace,$field[4]).'\r\n';
    $success_info.='<div class="box_success_info_row"><div';
    if($i==1) $success_info.=' class="box_success_info_row_separator"';
    if($i!=1 AND $i<$amount_of_fields) $success_info.=' class="box_success_info_row_separator"';
    if($i==$amount_of_fields) $success_info.=' class="box_success_info_row_separator"';
    $success_info.='>'.str_replace($arr_search,$arr_replace,$field[4]).'</div></div>';
    }
/* formatting and adding data for mail_body and success_info after sending form successfully end */   

  // RADIO
  if($field[1]=="type_radio" AND $field[2]=="true")
    {
   if(${'value_'.$field[0]}=="")
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   }
  // CHECKBOX
  if($field[1]=="type_checkbox" AND $field[2]=="true")
    {
   if(${'value_'.$field[0]}=="")
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   }
  // SELECT SINGLE
  if($field[1]=="type_select_single" AND $field[2]=="true")
    {
   if(${'value_'.$field[0]}=="")
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   }
  // SELECT MULTI
  if($field[1]=="type_select_multi" AND $field[2]=="true")
    {
   if(${'value_'.$field[0]}=="")
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   }
  // TEXT
  if($field[1]=="type_text" AND $field[2]=="true")
    {
   if(${'value_'.$field[0]}=="")
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   }
  if($field[1]=="type_text" AND $field[0]=="send_from_name") $send_from_name=${'value_'.$field[0]};
  // NUMBER
  if($field[1]=="type_number")
    {
   if(${'value_'.$field[0]}=="" AND $field[2]=="true")
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   if(!empty(${'value_'.$field[0]}))
      {
      if(!is_numeric(${'value_'.$field[0]}))
         {
         $array_errors[]=$field[3];
       $string_error_ids.=$field[0].';';
         }
         else
         {
       if($field[5]!="none")
         {
         $array_min_max=explode('|',$field[5]);
         if(${'value_'.$field[0]}*1<$array_min_max[0] OR ${'value_'.$field[0]}*1>$array_min_max[1])
           {
             $array_errors[]=$field[3];
           $string_error_ids.=$field[0].';';
           }
         }
         }
     }
   }
  // DATE
  if($field[1]=="type_date" AND $field[2]=="true")
    {
   if(${'value_'.$field[0]}=="")
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   if(!empty(${'value_'.$field[0]}))
      {
     $timestamp=strtotime(${'value_'.$field[0]});
     if($timestamp=="")
       {
      $array_errors[]=$field[3];
      $string_error_ids.=$field[0].';';
      }
     }
   }
  // EMAIL
  if($field[1]=="type_email")
    {
   if(${'value_'.$field[0]}=="" AND $field[2]=="true")
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   if(!empty(${'value_'.$field[0]}))
          {
          $mail_expr = "/^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/";
          if (!preg_match($mail_expr, ${'value_'.$field[0]}) )
             {
             $array_errors[]=$field[3];
             $string_error_ids.=$field[0].';';
             }
             else
               {
               if($field[0]=="send_from_email") $send_from_email=${'value_'.$field[0]};
               }
          }
   }
  // PASSWORD
  if($field[1]=="type_password" AND $field[2]=="true")
    {
    if(${'value_'.$field[0]}=="")
      {
      $array_errors[]=$field[3];
      $string_error_ids.=$field[0].';';
      }
    }
   if($field[1]=="type_password")
     {
     if(!empty(${'value_'.$field[0]}))
       {
       if(strlen(${'value_'.$field[0]}) < 6)
         {
         $array_errors[]=$field[3];
         $string_error_ids.=$field[0].';';
         }
       }
     }
  // TEXTAREA
  if($field[1]=="type_textarea")
    {
   if(${'value_'.$field[0]}=="" AND $field[2]=="true")
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   }
  // FILE   
  if($field[1]=="type_file")
    {
    $array_filetype=explode('/',$_FILES[$field[0]]['type']);
    $filetype=strtolower($array_filetype[1]);
    $filesize=$_FILES[$field[0]]['size'];
   if($filetype=="" AND $field[2]=="true")
     {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   if($filetype!="")
      {
    if(!in_array($filetype,$array_allowed_filetypes))
      {
       $string_allowed_filetypes="";
       foreach($array_allowed_filetypes_hint AS $element) $string_allowed_filetypes.=$element." "; // building error hint from array of allowed filetypes
      $array_errors[]=mi18n("output em filetype not allowed")." ".$string_allowed_filetypes;
     $string_error_ids.="attachment;";
     }
    if($filesize>$filesize_max)
      {
     $array_errors[]=mi18n("output em filesize too big");
     $string_error_ids.="attachment;";
     }
    }
   }
  // RANGE
  if($field[1]=="type_range" AND $field[2]=="true")
    {
   if(${'value_'.$field[0]}<$field[6])
      {
     $array_errors[]=$field[3];
     $string_error_ids.=$field[0].';';
     }
   }
  $i++;
  }
  $mail_body.='</table>';
  $success_info.='</div>';
  // ANTI SPAM
  if($anti_spam=="true")
    {
   if($countcha!=$countcha_to_prove_amount)
     {
     $array_errors[]=mi18n("output em amount of countchas not correct");
     $string_error_ids.="countcha;";
     }
   }
  /* showing error messages begin */
  if(count($array_errors)>1) $array_errors=array_unique($array_errors);
  if(count($array_errors)==0) $no_errors="true";
    else
     {
     $no_errors="false";
     echo '<p class="formular_fehlermeldungen">'.mi18n("output em there are errors");
     echo '<ul class="formular_fehlermeldungen">';
     foreach($array_errors AS $element) echo '<li>'.$element.'</li>';
     echo '</ul></p>';
     }
  /* showing error messages end */
/*########## checking for errors end ##########*/
  }


/*################################*/
/*########## displaying form begin ##########*/
/*################################*/
if($form_submitted=="" OR $no_errors=="false")
{
echo '<form method="post" action="front_content.php?idart='.$idart.'#startform" enctype="multipart/form-data">';
echo '<div class="box_form">';
$row_counter=1;
$rows_overall=count($array_fields);
foreach($array_fields AS $field)
  {
  $class_td_separator="box_form_row_separator";
  if($row_counter==1)
    {
     $class_td_head="box_form_row_s1_z1_ueb";// nowrap";
     }
    elseif($row_counter<$rows_overall)
       {
       $class_td_head="box_form_row_s1_zx_ueb";// nowrap";
       }
  if($row_counter==$rows_overall)
    {
    $class_td_head="box_form_row_s1_zende_ueb";// nowrap";
     }
  //PAGE BEGIN
  if (strpos($field, 'type_page_begin***') !== false)
    {
    $array_field_to_show=explode('***',$field);
    echo '<div class="box_form_page" id="form_page_'.$array_field_to_show[5].'">';
    echo '<div class="box_form_row"><div class="box_form_row_page_begin">';
    echo $array_field_to_show[1];
    if($show_page_steps=="true") echo '<span class="page_step_info">'.$array_field_to_show[5].$separator_page_step_info.$amount_of_pages.'</span>';
    echo '</div></div>';
    echo '<script type="text/javascript">show_hide_form_page("initial",'.$array_field_to_show[5].','.$amount_of_pages.',"form_page_'.$array_field_to_show[5].'");</script>';
    }
  //PAGE END
  if (strpos($field, 'type_page_end***') !== false)
    {
    $array_field_to_show=explode('***',$field);
    $array_buttons=explode('|',$array_field_to_show[8]);
    echo '<div class="box_form_row"><div class="box_form_row_page_end">';
    if($array_field_to_show[5]==$amount_of_pages)
      {
      if($array_buttons[0]!="-") echo '<input type="button" class="submit paging" value="'.$array_buttons[0].'" onclick="document.getElementById(\'anti_spam_and_submit\').style.display=\'none\';show_hide_form_page(\'previous\','.$array_field_to_show[5].','.$amount_of_pages.',\'form_page_'.$array_field_to_show[5].'\');"/>';
      if($array_buttons[1]!="-") echo '<input type="button" class="submit paging" value="'.$array_buttons[1].'" onclick="show_hide_form_page(\'next\','.$array_field_to_show[5].','.$amount_of_pages.',\'form_page_'.$array_field_to_show[5].'\');"/>';
      }
    if($array_field_to_show[5]==$amount_of_pages-1)
      {
      if($array_buttons[0]!="-") echo '<input type="button" class="submit paging" value="'.$array_buttons[0].'" onclick="show_hide_form_page(\'previous\','.$array_field_to_show[5].','.$amount_of_pages.',\'form_page_'.$array_field_to_show[5].'\');"/>';
      if($array_buttons[1]!="-") echo '<input type="button" class="submit paging" value="'.$array_buttons[1].'" onclick="document.getElementById(\'anti_spam_and_submit\').style.display=\'block\';show_hide_form_page(\'next\','.$array_field_to_show[5].','.$amount_of_pages.',\'form_page_'.$array_field_to_show[5].'\');"/>';
      }
    if($array_field_to_show[5]<$amount_of_pages-1)
      {
      if($array_buttons[0]!="-") echo '<input type="button" class="submit paging" value="'.$array_buttons[0].'" onclick="show_hide_form_page(\'previous\','.$array_field_to_show[5].','.$amount_of_pages.',\'form_page_'.$array_field_to_show[5].'\');"/>';
      if($array_buttons[1]!="-") echo '<input type="button" class="submit paging" value="'.$array_buttons[1].'" onclick="show_hide_form_page(\'next\','.$array_field_to_show[5].','.$amount_of_pages.',\'form_page_'.$array_field_to_show[5].'\');"/>';
      }
    echo '</div></div>';
    echo '</div>';
    }
  //RADIO
  if (strpos($field, 'type_radio***') !== false)
    {
    $array_radios=explode('+++',$field);
   $amount_of_radios=count($array_radios);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
    $i=1;
    foreach($array_radios AS $radio)
      {
     $array_field_to_show=explode('***',$radio);
      if($i==1)
       {
       echo $array_field_to_show[1].' ';
      if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
        echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
       }
     echo '<input id="input_id_'.$array_field_to_show[3].'_'.htmlspecialchars_decode($array_field_to_show[7]).'" type="radio" name="'.$array_field_to_show[3].'"';
     if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
     if($array_field_to_show[5]!="none") echo ' value="'.$array_field_to_show[5].'"';
     if(${'value_'.$array_field_to_show[3]}==$array_field_to_show[5]) echo ' checked="checked"';
	 if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
     echo '/>';
     if($array_field_to_show[7]!="none") echo ' <label for="input_id_'.$array_field_to_show[3].'_'.htmlspecialchars_decode($array_field_to_show[7]).'">'.htmlspecialchars_decode($array_field_to_show[7]);
     if($i==$amount_of_radios) echo '</label></div></div>';
       else
        {
		echo '</label>';
        if($array_field_to_show[8]!="horizontal") echo '<br/>';
          else echo '&nbsp;';
        }
     $i++;
     }
    }
  //CHECKBOX
  if (strpos($field, 'type_checkbox***') !== false)
    {
    $array_checkboxes=explode('+++',$field);
   $amount_of_checkboxes=count($array_checkboxes);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
    $i=1;
    foreach($array_checkboxes AS $checkbox)
      {
     $array_field_to_show=explode('***',$checkbox);
      if($i==1)
       {
       echo $array_field_to_show[1].' ';
      if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
        echo '</div><div class="box_form_data">';
       }
     echo '<input id="input_id_'.$array_field_to_show[3].'" type="checkbox" name="'.$array_field_to_show[3].'"';
     if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
     if($array_field_to_show[5]!="none") echo ' value="'.$array_field_to_show[5].'"';
     if(${'value_'.$array_field_to_show[3]}==$array_field_to_show[5]) echo ' checked="checked"';
	 if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
     echo '/>';
     if($array_field_to_show[7]!="none") echo ' <span id="'.$array_field_to_show[3].'"><label for="input_id_'.$array_field_to_show[3].'">'.htmlspecialchars_decode($array_field_to_show[7]).'</span>';
     if($i==$amount_of_checkboxes) echo '</label></div></div>';
       else
        {
		echo '</label>';
        if($array_field_to_show[8]!="horizontal") echo '<br/>';
          else echo '&nbsp;';
        }
     $i++;
     }
    }
  //SELECT SINGLE
  if (strpos($field, 'type_select_single***') !== false)
    {
    $array_options=explode('+++',$field);
   $amount_of_options=count($array_options);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
    $i=1;
    foreach($array_options AS $option)
      {
     $array_field_to_show=explode('***',$option);
      if($i==1)
       {
       echo $array_field_to_show[1].' ';
      if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
        echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
        if($array_field_to_show[7]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[7].'</label><br/>';
       echo '<select id="input_id_'.$array_field_to_show[3].'" name="'.$array_field_to_show[3].'"';
       if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
       if($array_field_to_show[6]!="none") echo ' size="'.$array_field_to_show[6].'"';
	   if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
        echo '/>';
       }
      echo '<option value="'.$array_field_to_show[5].'"';
     if(${'value_'.$array_field_to_show[3]}==$array_field_to_show[5]) echo ' selected';
     echo '>'.$array_field_to_show[5].'</option>';
     if($i==$amount_of_options) echo '</select></div></div>';
     $i++;
     }
    }
  //SELECT MULTI
  if (strpos($field, 'type_select_multi***') !== false)
    {
    $array_options=explode('+++',$field);
   $amount_of_options=count($array_options);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
    $i=1;
    foreach($array_options AS $option)
      {
     $array_field_to_show=explode('***',$option);
      if($i==1)
       {
       echo $array_field_to_show[1].' ';
      if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
        echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
        if($array_field_to_show[7]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[7].'</label><br/>';
       echo '<select id="input_id_'.$array_field_to_show[3].'" name="'.$array_field_to_show[3].'[]" multiple="multiple"';
       if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
       if($array_field_to_show[6]!="none") echo ' size="'.$array_field_to_show[6].'"';
	   if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
        echo '/>';
       }
      echo '<option value="'.$array_field_to_show[5].'"';
     if(in_array($array_field_to_show[5],${'value_'.$array_field_to_show[3]})) echo ' selected';
     echo '>'.$array_field_to_show[5].'</option>';
     if($i==$amount_of_options) echo '</select></div></div>';
     $i++;
     }
    }
  //TEXT
  if (strpos($field, 'type_text***') !== false)
    {
    $array_field_to_show=explode('***',$field);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
     if($array_field_to_show[1]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[1].'</label> ';
	   else echo '&nbsp;';
     if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
   echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
    echo '<input id="input_id_'.$array_field_to_show[3].'" type="text" name="'.$array_field_to_show[3].'"';
    if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
   echo ' value="'.${'value_'.$array_field_to_show[3]}.'"';
   if($array_field_to_show[6]!="none") echo ' style="width: '.$array_field_to_show[6].'%;"';
   if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
    echo '/>';
    if($array_field_to_show[7]!="none") echo ' '.htmlspecialchars_decode($array_field_to_show[7]);
	echo '</div></div>';
    }
  //NUMBER
  if (strpos($field, 'type_number***') !== false)
    {
    $array_field_to_show=explode('***',$field);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
     if($array_field_to_show[1]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[1].'</label> ';
	   else echo '&nbsp;';
     if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
   echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
    echo '<input id="input_id_'.$array_field_to_show[3].'" type="';
	if($html5_functions=="true") echo 'number';
      else echo 'text';
	echo '" name="'.$array_field_to_show[3].'"';
    if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
   echo ' value="'.${'value_'.$array_field_to_show[3]}.'"';
   if($array_field_to_show[6]!="none") echo ' style="width: '.$array_field_to_show[6].'%;"';
   if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
    echo '/>';
    if($array_field_to_show[7]!="none") echo ' '.htmlspecialchars_decode($array_field_to_show[7]);
	echo '</div></div>';
    }
  //DATE
  if (strpos($field, 'type_date***') !== false)
    {
    $array_field_to_show=explode('***',$field);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
    if($array_field_to_show[1]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[1].'</label> ';
	  else echo '&nbsp;';
     if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
   echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
    echo '<input id="input_id_'.$array_field_to_show[3].'" type="';
	if($html5_functions=="true") echo 'date';
	  else echo 'text';
	echo '" name="'.$array_field_to_show[3].'"';
    if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
   echo ' value="'.${'value_'.$array_field_to_show[3]}.'"';
   if($array_field_to_show[6]!="none") echo ' style="width: '.$array_field_to_show[6].'%;"';
   if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
    echo '/>';
    if($array_field_to_show[7]!="none") echo ' '.htmlspecialchars_decode($array_field_to_show[7]);
	echo '</div></div>';
    }
  //EMAIL
  if (strpos($field, 'type_email***') !== false)
    {
    $array_field_to_show=explode('***',$field);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
    if($array_field_to_show[1]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[1].'</label> ';
	  else echo '&nbsp;';
     if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
   echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
    echo '<input id="input_id_'.$array_field_to_show[3].'" type="email" name="'.$array_field_to_show[3].'"';
    if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
   echo ' value="'.${'value_'.$array_field_to_show[3]}.'"';
   if($array_field_to_show[6]!="none") echo ' style="width: '.$array_field_to_show[6].'%;"';
   if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
    echo '/>';
    if($array_field_to_show[7]!="none") echo ' '.htmlspecialchars_decode($array_field_to_show[7]);
	echo '</div></div>';
    }
  //PASSWORD
  if (strpos($field, 'type_password***') !== false)
    {
    $array_field_to_show=explode('***',$field);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
    if($array_field_to_show[1]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[1].'</label> ';
	  else echo '&nbsp;';
     if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
   echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
    echo '<input id="input_id_'.$array_field_to_show[3].'" type="password" name="'.$array_field_to_show[3].'"';
    if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
   echo ' value="'.${'value_'.$array_field_to_show[3]}.'"';
   if($array_field_to_show[6]!="none") echo ' style="width: '.$array_field_to_show[6].'%;"';
   if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
    echo '/>';
    if($array_field_to_show[7]!="none") echo ' '.htmlspecialchars_decode($array_field_to_show[7]);
	echo '</div></div>';
    }
  //TEXTAREA
  if (strpos($field, 'type_textarea***') !== false)
    {
    $array_field_to_show=explode('***',$field);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
    if($array_field_to_show[1]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[1].'</label> ';
      else echo '&nbsp;';
     if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
   echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
   if($array_field_to_show[7]!="none") echo ' '.htmlspecialchars_decode($array_field_to_show[7]).'<br/>';
    echo '<textarea id="input_id_'.$array_field_to_show[3].'" name="'.$array_field_to_show[3].'"';
    if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
   if($array_field_to_show[6]!="none")
     {
     $array_dimensions=explode('x',$array_field_to_show[6]);
     echo ' rows="'.$array_dimensions[0].'" style="width:'.$array_dimensions[1].'%;"';
     }
	if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
    echo '/>';
   echo ${'value_'.$array_field_to_show[3]};
   echo '</textarea>';
    echo '</div></div>';
    }
  //FILE
  if (strpos($field, 'type_file***') !== false AND $attachment_allowed=="true")
    {
    $array_field_to_show=explode('***',$field);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
    if($array_field_to_show[1]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[1].'</label> ';
      else echo '&nbsp;';
     if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
   echo '<br/><p class="formular_hinweis">'.$allowed_filetypes_hint_form.'</p>';
   echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
    echo '<input id="input_id_'.$array_field_to_show[3].'" type="file" name="'.$array_field_to_show[3].'"';
    if($array_field_to_show[4]!="none") echo ' class="'.$array_field_to_show[4].'"';
   if (isset($_FILES[$array_field_to_show[3]]['name'])) echo $_FILES['attachment']['name']; else echo '-';
   if($array_field_to_show[2]=="true" AND $html5_functions=="true") echo ' required';
    echo '/>';
    if($array_field_to_show[7]!="none") echo '<br/>'.htmlspecialchars_decode($array_field_to_show[7]);
	echo '</div></div>';
    }
  //RANGE
  if (strpos($field, 'type_range***') !== false)
    {
    $array_field_to_show=explode('***',$field);
   echo '<div class="box_form_row"><div class="'.$class_td_head.'">';
     if($array_field_to_show[1]!="none") echo '<label for="input_id_'.$array_field_to_show[3].'">'.$array_field_to_show[1].'</label> ';
	   else echo '&nbsp;';
     if($array_field_to_show[2]=="true" AND $array_field_to_show[1]!="none") echo '*';
   echo '</div><div class="box_form_data" id="'.$array_field_to_show[3].'">';
   if($array_field_to_show[7]!="none") echo ' '.htmlspecialchars_decode($array_field_to_show[7]).'<br/>';
   if($array_field_to_show[6]!="none") // individual configuration is given
     {
     $array_range_min_max_step_start_width=explode('|',$array_field_to_show[6]);
     echo $array_range_min_max_step_start_width[0].'<input id="input_id_'.$array_field_to_show[3].'" type="range" name="'.$array_field_to_show[3].'" min="'.$array_range_min_max_step_start_width[0].'" max="'.$array_range_min_max_step_start_width[1].'" step="'.$array_range_min_max_step_start_width[2].'"';
	 if(${'value_'.$array_field_to_show[3]}=="") echo ' value="'.$array_range_min_max_step_start_width[3].'" ';
	   else echo ' value="'.${'value_'.$array_field_to_show[3]}.'" ';
	 echo 'style="width: '.$array_range_min_max_step_start_width[4].'%;"';
	 if($array_field_to_show[8]!="none") echo ' list="tickmarks_input_id_'.$array_field_to_show[3].'"';
	 echo '/>'.$array_range_min_max_step_start_width[1];
	 }
	 else // individual configuration is not given
	  {
	  echo '0<input id="input_id_'.$array_field_to_show[3].'" type="range" name="'.$array_field_to_show[3].'" min="0" max="10" step="1"';
	  if(${'value_'.$array_field_to_show[3]}=="") echo ' value="0" ';
	    else echo ' value="'.${'value_'.$array_field_to_show[3]}.'" ';
	  if($array_field_to_show[8]!="none") echo ' list="tickmarks_input_id_'.$array_field_to_show[3].'"';
	  echo '/>10';
	  }
	if($array_field_to_show[8]!="none")
	  {
	  $array_range_tickmarks=explode('|',$array_field_to_show[8]);
	  echo '<datalist id="tickmarks_input_id_'.$array_field_to_show[3].'">';
	  foreach($array_range_tickmarks AS $tickmark) echo '<option value="'.$tickmark.'">';
      echo '</datalist>';
	  }
	echo '</div></div>';
    }
  //SEPARATOR
  if (strpos($field, 'type_separator***') !== false)
    {
    $array_field_to_show=explode('***',$field);
    echo '<div class="box_form_row"><div class="'.$class_td_separator;
	if($array_field_to_show[4]!="none") echo ' '.$array_field_to_show[4];
	echo '">';
    echo $array_field_to_show[1].' ';
    echo '</div></div>';
    }
   $row_counter++;
  }
echo '</div>';

echo '<p class="hint_mandatory_fields">'.mi18n("output form * fields have to be filled").'</p>';

echo '<div id="anti_spam_and_submit">';
/********** anti_spam begin **********/
if($anti_spam=="true")
  {
  $amount_countcha_1=rand(1,$amount_countchas);
  $amount_countcha_2=rand(1,$amount_countchas-$amount_countcha_1);
  $amount_countcha_3=rand(1,$amount_countchas-$amount_countcha_1-$amount_countcha_2);
  $countcha_chosen=rand(1,3);
  $countcha_chosen_hint=${'name_countcha_'.$countcha_chosen};
  $countcha_to_prove_amount=${'amount_countcha_'.$countcha_chosen};
  echo '<div class="formular_anti_spam">';
  echo '<input type="hidden" name="countcha_to_prove_amount" value="'.$countcha_to_prove_amount.'"/>';
  $c=1;
  while($c<=3)
    {
    $i=0;
    while($i<${'amount_countcha_'.$c})
      {
     echo '<img class="countcha" src="'.${'countcha_'.$c}.'" title="" alt=""/>';
     $i++;
     }
    $c++;
    }
  echo '<br/>'.mi18n("output form anti_spam_hint_1");
  echo ' '.$countcha_chosen_hint.' ';
  echo mi18n("output form anti_spam_hint_2");
   echo ' <input id="countcha" type="text" class="text" style="width: 5em;" name="countcha" value="';
      if (isset($countcha)) echo $countcha; else echo '';
      echo '"/>';
  echo '</div>';
  }
/********** anti_spam end **********/
echo '<input class="submit" type="submit" name="form_submitted" value="'.mi18n("output form send").'"/>';
echo '</div>';
echo '</form>';
}


/********** hiding submit and antispam if form has more than one page begin **********/
if($amount_of_pages>0) echo '
<script type="text/javascript">
document.getElementById(\'anti_spam_and_submit\').style.display="none";
</script>';
/********** hiding submit and antispam if form has more than one page end **********/


/********** marking errors begin **********/
// this part has to run after the form is fully displayed. otherwise the ids would not be present for js
if($form_submitted!="" AND $no_errors=="false")
  {
  ?>
  <script type="text/javascript">
  var var_string_error_ids="<?php echo $string_error_ids;?>";
  var array_error_ids=var_string_error_ids.split(";");
  var a=0;
  while(a!=array_error_ids.length)
    {
    document.getElementById(array_error_ids[a]).style.backgroundColor="#ff0000";
    a=a+1;
    }
  </script>
  <?php
  }
/********** marking errors end **********/

/*###############################*/
/*########## displaying form end ##########*/
/*###############################*/



/*##############################################*/
/*########## sending mail and displaying mailed data begin ##########*/
/*#############################################*/
/********** sending mail begin **********/
if($use_smtp=="false")
{
if($form_submitted!="" AND $no_errors=="true")
  {
  $ip = htmlspecialchars(strip_tags($_SERVER["REMOTE_ADDR"]));
  if($gender=="female") $gender_mail=mi18n("output email female");
    else $gender_mail=mi18n("output email male");
  //building array with recipients
  $recipients = "CMS_VALUE[100]";
  $array_recipients=array_filter(explode("//",$recipients));
  $recipients_in_array=explode("//",$recipients);
  //formatting subject of email
  $mail_subject="CMS_VALUE[200]";
  $mail_subject_variables="CMS_VALUE[210]";
  if($mail_subject_variables!="")
    {
    $array_mail_subject_variables=explode("###",$mail_subject_variables);
    foreach($array_mail_subject_variables AS $subject_variable) $mail_subject.=utf8_decode(' '.${$subject_variable});
    }
  // mail_body ist build within checking for errors section
  if($send_from_name!="" AND $send_from_email!="")
    {
	$name=$send_from_name;
	$email=$send_from_email;
	}
  if($filetype=="")
  {
$random_hash = md5(date('r', time()));
$headers = "From: ".$send_from_email."\r\nReply-To: ".$send_from_email;
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-".$random_hash."\"";
ob_start(); //Turn on output buffering, IMPORTANT: DO NOT REMOVE ANY OF THE FOLLOWING EMPTY LINES OR ADD BLANKSPACES BEFORE THE CODELINES TILL $message = ob_get_clean();!!! OTHERWISE THE CODE WON'T WORK BECAUSE OF WRONG BUFFER-CONTENTS!!!
?>
--PHP-alt-<?php echo $random_hash; ?> 
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<?php echo $mail_body_plain_text."\n"; ?>

--PHP-alt-<?php echo $random_hash; ?> 
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<?php echo nl2br($mail_body)."\n"; ?>

--PHP-alt-<?php echo $random_hash; ?>--
<?php
$message = ob_get_clean();//copy current buffer contents into $message variable and delete current output buffer
  }
  else
    {
$random_hash = md5(date('r', time()));
$headers = "From: ".$send_from_email."\r\nReply-To: ".$send_from_email;
$headers .= "\r\nContent-Type: multipart/mixed; boundary=\"PHP-mixed-".$random_hash."\"";
$attachment = chunk_split(base64_encode(file_get_contents($_FILES['attachment']['tmp_name'])));
ob_start();  //Turn on output buffering, IMPORTANT: DO NOT REMOVE ANY OF THE FOLLOWING EMPTY LINES OR ADD BLANKSPACES BEFORE THE CODELINES TILL $message = ob_get_clean();!!! OTHERWISE THE CODE WON'T WORK BECAUSE OF WRONG BUFFER-CONTENTS!!!
?>
--PHP-mixed-<?php echo $random_hash; ?> 
Content-Type: multipart/alternative; boundary="PHP-alt-<?php echo $random_hash; ?>"

--PHP-alt-<?php echo $random_hash; ?> 
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<?php echo $mail_body_plain_text."\n"; ?>

--PHP-alt-<?php echo $random_hash; ?> 
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<?php echo nl2br($mail_body)."\n"; ?>

--PHP-alt-<?php echo $random_hash; ?>--

--PHP-mixed-<?php echo $random_hash; ?> 
Content-Type: <?php echo $_FILES['attachment']['type']; ?>; name="<?php echo $_FILES['attachment']['name']; ?>"
Content-Transfer-Encoding: base64 
Content-Disposition: attachment 

<?php echo $attachment; ?>
--PHP-mixed-<?php echo $random_hash; ?>--

<?php
$message = ob_get_clean();//copy current buffer contents into $message variable and delete current output buffer
    }
if($use_smtp=="false")
  {
  foreach($recipients_in_array as $recipient)
    {
    if (@mail($recipient,$mail_subject,$message,$headers)) $sent = true;
      else echo "<br/>keine Verbindung zum Mailserver - bitte nochmal versuchen";
    }
  }
/********** sending mail end **********/
/********** displaying mailed data begin **********/
if($show_data_in_success_note=="true")
  {
  echo '<p>'.mi18n("output form following information was mailed").'</p>';
  echo $success_info; // build within checking for errors section
  }
  else echo '<p>'.mi18n("output form simple success info").'</p>';
/********** displaying mailed data end **********/
  }
}
else
{	
if($form_submitted!="" AND $no_errors=="true")
  {	  
  $ip = htmlspecialchars(strip_tags($_SERVER["REMOTE_ADDR"]));
  if($gender=="female") $gender_mail=mi18n("output email female");
    else $gender_mail=mi18n("output email male");
  //building array with recipients
  $recipients = "CMS_VALUE[100]";
  $array_recipients=array_filter(explode("//",$recipients));
  $recipients_in_array=explode("//",$recipients);
  //formatting subject of email
  $mail_subject="CMS_VALUE[200]";
  $mail_subject_variables="CMS_VALUE[210]";
  if($mail_subject_variables!="")
    {
    $array_mail_subject_variables=explode("###",$mail_subject_variables);
    foreach($array_mail_subject_variables AS $subject_variable) $mail_subject.=utf8_decode(' '.${$subject_variable});
    }
  // mail_body is build within checking for errors section
  $mailer = new cMailer();
  $message = Swift_Message::newInstance();
  $message->setFrom($send_from_email);
  $message->setSubject($mail_subject);
  $message->setContentType($content_type);
  if($content_type=="text/html") $message->setBody($mail_body);
    else $message->setBody($mail_body_plain_text);
  if($filetype!="")
    {
	$message->attach(Swift_Attachment::fromPath($_FILES['attachment']['tmp_name'])->setFilename($_FILES['attachment']['name']));
    }
  foreach($recipients_in_array as $recipient)
    {
    $message->setTo($recipient);
    $mailer->send($message);
	}
  if($show_data_in_success_note=="true")
    {
    echo '<p>'.mi18n("output form following information was mailed").'</p>';
    echo $success_info; // build within checking for errors section
    }
    else echo '<p>'.mi18n("output form simple success info").'</p>';
  }
}
/*############################################*/
/*########## sending mail and displaying mailed data end ##########*/
/*############################################*/
?>
Zuletzt geändert von McHubi am Mo 13. Apr 2020, 13:07, insgesamt 10-mal geändert.
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Re: Formulargenerator

Beitrag von McHubi » Di 26. Mär 2019, 20:17

CSS
Stand: 26.03.2019

Code: Alles auswählen

div.box_form {
margin-top: 2em;
clear: both;
padding: 0.5em;
}
div.box_form_row {
clear: both;
margin-bottom: 1px;
overflow: hidden;
}
div.box_form_row_s1_z1_ueb {
float: left;
width: 40%;
color: #023062;
font-weight: 900;
}
div.box_form_row_s1_zx_ueb {
float: left;
width: 40%;
border-top: 0px solid #e6e6e6;
color: #023062;
font-weight: 900;
}
div.box_form_row_s1_zende_ueb {
float: left;
width: 40%;
border-top: 0px solid #e6e6e6;
color: #023062;
font-weight: 900;
}
div.box_form_data {
float: left;
width: 60%;
}
div.box_form_page {
}
div.box_form_row_page_begin {
border-bottom: 1px solid #ffffff;
}
div.box_form_row_page_end {
border-top: 1px solid #ffffff;
text-align: center;
}
div.box_form_row_separator {
width: 100%;
border-top: 0px solid #e6e6e6;
font-weight: 900;
color: #ffffff;
}
div.box_success_info {
margin-top: 2em;
clear: both;
padding: 0.5em;
overflow: hidden;
}
div.box_success_info_row {
clear: both;
}
div.box_success_info_row_s1_z1_ueb {
float: left;
width: 40%;
color: #023062;
font-weight: 900;
}
div.box_success_info_row_s1_zx_ueb {
float: left;
width: 40%;
border-top: 0px solid #e6e6e6;
color: #023062;
font-weight: 900;
}
div.box_success_info_row_s1_zende_ueb {
float: left;
width: 40%;
border-top: 0px solid #e6e6e6;
color: #023062;
font-weight: 900;
}
div.box_success_info_data {
float: left;
width: 60%;
}
div.box_success_info_row_separator {
width: 100%;
border-top: 0px solid #e6e6e6;
color: #023062;
font-weight: 900;
}

img.countcha {
height: 2em;
width: auto;
margin-right: 0.1em;
}
input.text {
width: 90%;
border: 1px solid #ffffff;
background-color: #ffffff;
}
textarea.textarea {
width: 100%;
border: 1px solid #ffffff;
background-color: #ffffff;
}
input.paging {
margin: 0.5em;
}
input.submit {
margin-top: 1em;
padding: 0.5em;
border: 1px solid #023062;
border-radius: 0.2em;
background-color: #ffffff;
color: #023062;
text-decoration: none;
transition: background-color 1s;
}
input.submit:hover {
margin-top: 1em;
background-color: #023062;
color: #ffffff;
cursor: pointer;
}
div.formular_anti_spam {
}
p.formular_fehlermeldungen,
ul.formular_fehlermeldungen {
color: #ff0000;
}
p.formular_hinweis,
span.formular_hinweis {
font-size: 0.9em;
font-weight: normal;
}
p.hint_mandatory_fields {
}
span.formular_allowed_filetypes {
padding: 1px;
}
span.page_step_info {
margin-left: 1em;
}

.nowrap {
}
.fgsd_sep_personal_data,
.fgsd_sep_where,
.fgsd_sep_general_cleaning,
.fgsd_sep_hygiene,
.fgsd_sep_carpet,
.fgsd_sep_message,
.fgsd_sep_windows,
.fgsd_sep_date {
background-size: contain;
background-repeat: no-repeat;
background-position: center left;
padding-left: 4em;
margin-top: 1em;
margin-bottom: 0.5em;
height: 3em;
line-height: 3em;
border-bottom: 1px solid #023062;
}
.fgsd_sep_personal_data {
background-image: url('../upload/module/form_generator_sd/icon-form-personal-data.png');
}
.fgsd_sep_where {
background-image: url('../upload/module/form_generator_sd/icon-form-where.png');
}
.fgsd_sep_intro {
margin-top: 2em;
margin-bottom: 2em;
}
.fgsd_sep_general_cleaning {
background-image: url('../upload/module/form_generator_sd/icon-form-general-cleaning.png');
}
.fgsd_sep_hygiene {
background-image: url('../upload/module/form_generator_sd/icon-form-hygiene.png');
}
.fgsd_sep_carpet {
background-image: url('../upload/module/form_generator_sd/icon-form-carpet.png');
}
.fgsd_sep_windows {
background-image: url('../upload/module/form_generator_sd/icon-form-window.png');
}
.fgsd_sep_date {
background-image: url('../upload/module/form_generator_sd/icon-form-calendar.png');
}
.fgsd_sep_message {
background-image: url('../upload/module/form_generator_sd/icon-form-message.png');
}
@media only screen and (max-width: 49em) {
div.box_form_row_s1_z1_ueb,
div.box_form_row_s1_zx_ueb,
div.box_form_row_s1_zende_ueb,
div.box_form_data {
width: 100%;
}
}
JavaScript
Stand: 26.03.2019

Code: Alles auswählen

/*
IMPORTANT:
this function has to be loaded at the start of webpage rendering. placed here within the module itself, it will be loaded at the end of page rendering. so you have to take this code and embed it earlier, e.g. in <head>
it is noted here just for "package"-purposes.

function show_hide_form_page(var_reason_of_calling_function,var_page_number,var_pages_total,var_id_current_page) {
if(var_reason_of_calling_function=="initial" && var_page_number>1) document.getElementById(var_id_current_page).style.display="none";
if(var_reason_of_calling_function=="next")
  {
  var var_page_number_next=var_page_number+1;
  var var_id_next_page="form_page_"+var_page_number_next;
  document.getElementById(var_id_current_page).style.display="none";
  document.getElementById(var_id_next_page).style.display="block";
  window.location.hash = "startform";
  }
if(var_reason_of_calling_function=="previous")
  {
  var var_page_number_previous=var_page_number-1;
  var var_id_previous_page="form_page_"+var_page_number_previous;
  document.getElementById(var_id_current_page).style.display="none";
  document.getElementById(var_id_previous_page).style.display="block";
  window.location.hash = "startform";
  }
}
*/
lang_de_DE.txt
Stand: 26.03.2019

Code: Alles auswählen

input activate data in success note=Eingetragene Daten in Sendebestätigung anzeigen?
input activate html5 functions=HTML5-Funktionen aktivieren?
input activate page step info=Bei mehrseitigen Formularen: Formularschritt anzeigen?
input anti_spam active=Spamschutz aktivieren?
input attachment allowed=Dateianhang erlauben?
input email subject=eMail-Betreff
input email subject hint=Betreff
input email subject variables=Variablen im Betreff
input email subject variables hint=Variablen aus Formularfeldern eintragen und mit ### voneinander trennen. Beispiel:
input examples=Komplettes Beispielformular
input explanations=Erläuterungen
input filesize max=Maximale Dateigröße
input filesize max hint=(in Bytes, 1MB\=1000000 Bytes)
input form fields=Formularfelder
input please save content in case of accidentally deleting it=Tipp: Sichern Sie den Inhalt dieses Feldes z. B. in einer Textdatei um im Falle eines unbeabsichtigten Löschens das Formular wieder herstellen zu können.
input recipients=eMail-Adressen Empfänger
input recipients hint=weitere Empfänger
no=nein
output em amount of countchas not correct=Sie haben die Frage zum Spamschutz nicht korrekt beantwortet.
output em filesize too big=Der Dateianhang ist zu groß.
output em filetype not allowed=Das Format des Dateianhangs ist nicht erlaubt.
output em there are errors=Beim Absenden des Formulars sind Fehler aufgetreten:
output email female=Frau
output email male=Herr
output form * fields have to be filled=* Pflichtfelder
output form anti_spam_hint_1=Wie viele
output form anti_spam_hint_2=sehen Sie?
output form countcha 1 name=Punkte
output form countcha 2 name=Quadrate
output form countcha 3 name=Dreiecke
output form following information was mailed=Vielen Dank für Ihre Nachricht. Sie haben uns diese Informationen zukommen lassen:
output form send=Abschicken
output form simple success info=Vielen Dank für ihre Nachricht.
output separator page step info=&nbsp;von&nbsp;
yes=ja
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Re: Formulargenerator

Beitrag von McHubi » Mi 18. Sep 2019, 00:07

Hallo zusammen,

es gibt eine neue Verbesserung des Formulars. Bisher wurde bei mehrseitigen Formularen der Spamschutz und Absendebutton auf jeder Seite angezeigt. Anpassungen in der Modul-Ausgabe sorgen dafür, dass - per JavaScript - bei mehrseitigen Fomularen der Absende-Button und Spamschutz nur auf der letzten Seite angezeigt wird. Das Formular ist - wie bisher - auch bei deaktiviertem JS voll funktionsfähig.

Die Anpassungen sind in den Quelltexten weiter oben bereits eingearbeitet.

VG,

Markus
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Re: Formulargenerator

Beitrag von McHubi » Mo 13. Apr 2020, 13:12

13.04.2020: Für den Versand der E-Mail kann jetzt auch die seitens des Nutzers im Formular angegebene Mailadresse und der Name verwendet werden. Die per $send_from_name und $send_from_email gesetzte Konfiguration in der Modulausgabe wird überschrieben, wenn im Artikelreiter "Konfiguration" für den Namen und die Mailadresse statt des Variablennamens name und email der Variablenname send_from_name bzw. send_from_email verwendet wird.

Die Anpassung ist - wie immer - im obigen Quelltext zur Modulausgabe enthalten.
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

shi
Beiträge: 251
Registriert: Fr 5. Nov 2004, 14:12
Kontaktdaten:

Re: Formulargenerator

Beitrag von shi » Mo 20. Apr 2020, 11:18

Wird bei dem Modul die vom Anfragenden eingetragene Mail-Adresse als Antwortadresse benutzt, wenn man im Mailprogramm auf "antworten" klickt? Oder muss man man wie PIFA-FORM die Mailadressen erst kopieren.

McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Re: Formulargenerator

Beitrag von McHubi » Mo 20. Apr 2020, 11:43

Hallo shi,

das sollte eigentlich so sein - probiere es doch einfach mal aus... :wink: Du solltest dann aber die Ergänzung vom 13.04.2020 beachten - denn nur dann wird die vom User eingetragene Adresse als Absender verwendet.

VG

Markus
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

tagkalle
Beiträge: 21
Registriert: Mo 7. Sep 2009, 14:46
Kontaktdaten:

Re: Formulargenerator

Beitrag von tagkalle » Do 24. Sep 2020, 13:42

Hallo,
ich bekomme leider folgende Fehlermeldung beim versenden.
Seite Bleibt weiß.

Server: 1und1
PHP version: 7.3.22

[24-Sep-2020 14:37:55 Europe/Berlin] PHP Warning: A non-numeric value encountered in /homepages/xx/xxxxxx/htdocs/contenido/includes/frontend/include.front_content.php(762) : eval()'d code on line 148
[24-Sep-2020 14:37:59 Europe/Berlin] PHP Warning: A non-numeric value encountered in /homepages/xx/xxxxxx/htdocs/contenido/includes/frontend/include.front_content.php(762) : eval()'d code on line 148
[24-Sep-2020 14:37:59 Europe/Berlin] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/43/d399979678/htdocs/contenido/includes/frontend/include.front_content.php(762) : eval()'d code on line 148
[24-Sep-2020 14:37:59 Europe/Berlin] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/43/d399979678/htdocs/contenido/includes/frontend/include.front_content.php(762) : eval()'d code on line 148
[24-Sep-2020 14:37:59 Europe/Berlin] PHP Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in /homepages/xx/xxxxxx/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:345
Stack trace:
#0 /homepages/xx/xxxxxx/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(261): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('')
#1 /homepages/xx/xxxxxx/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array)
#2 /homepages/xx/xxxxxx/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array)
#3 /homepages/xx/xxxxxx/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(592): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array)
#4 /homepages/xx/xxxxxx/htdocs/contenido/classes/swiftmailer/lib/classes/Sw in /homepages/xx/xxxxxx/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php on line 345

Könnt Ihr mir helfen?
Danke

McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Re: Formulargenerator

Beitrag von McHubi » Do 24. Sep 2020, 14:40

Hallo tagkalle,
Address in mailbox given [] does not comply with RFC 2822
Swift_Mime_Headers_MailboxHeader->_assertValidAddress('')
Hast Du eine valide Empfängeradresse eingetragen?
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

tagkalle
Beiträge: 21
Registriert: Mo 7. Sep 2009, 14:46
Kontaktdaten:

Re: Formulargenerator

Beitrag von tagkalle » Do 24. Sep 2020, 16:30

Danke für die schnelle Antwort.
Ich habe alles überprüft.
Es wird nicht besser.

e-mail adresse ist die selbe.

[24-Sep-2020 17:22:02 Europe/Berlin] PHP Warning: A non-numeric value encountered in /homepages/43/d399979678/htdocs/contenido/includes/frontend/include.front_content.php(762) : eval()'d code on line 157
[24-Sep-2020 17:22:10 Europe/Berlin] PHP Warning: A non-numeric value encountered in /homepages/43/d399979678/htdocs/contenido/includes/frontend/include.front_content.php(762) : eval()'d code on line 157
[24-Sep-2020 17:22:10 Europe/Berlin] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/43/d399979678/htdocs/contenido/includes/frontend/include.front_content.php(762) : eval()'d code on line 158
[24-Sep-2020 17:22:10 Europe/Berlin] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/43/d399979678/htdocs/contenido/includes/frontend/include.front_content.php(762) : eval()'d code on line 158
[24-Sep-2020 17:22:10 Europe/Berlin] PHP Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in /homepages/43/d399979678/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:345
Stack trace:
#0 /homepages/43/d399979678/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(261): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('')
#1 /homepages/43/d399979678/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array)
#2 /homepages/43/d399979678/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array)
#3 /homepages/43/d399979678/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(592): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array)
#4 /homepages/43/d399979678/htdocs/contenido/classes/swiftmailer/lib/classes/Sw in /homepages/43/d399979678/htdocs/contenido/classes/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php on line 345

McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Re: Formulargenerator

Beitrag von McHubi » Do 24. Sep 2020, 17:51

Wo hast Du denn welche Mailadresse (für die Angabe hier ggf. umbenennen) eingetragen? In der Modulausgabe am Anfang (Hinweise im Code beachten) und auch im Konfigbereich von Contenido? Läuft die Mailadresse auf Deine Domain? Lt. Fehlermeldungen stimmt was mit der Mailadresse nicht.
Ich hab das Modul genau so zigfach im Einsatz ohne Probleme.
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

tagkalle
Beiträge: 21
Registriert: Mo 7. Sep 2009, 14:46
Kontaktdaten:

Re: Formulargenerator

Beitrag von tagkalle » Do 24. Sep 2020, 18:55

Danke für den Tip.
Funktioniert jetzt super.
Hatte den Anfang der Ausgabe nicht konfiguriert.

DAAANKE

McHubi
Beiträge: 1209
Registriert: Do 18. Nov 2004, 23:06
Wohnort: Mettmann
Kontaktdaten:

Re: Formulargenerator

Beitrag von McHubi » So 27. Sep 2020, 14:08

Gerne! :D
seamless-design.de
"Geht nicht!" wohnt in der "Will nicht!"-Strasse.

Das Handbuch zur Version 4.10: CONTENIDO für Einsteiger (4.10)

Das Handbuch zur Version 4.9: CONTENIDO für Einsteiger (4.9)

Antworten