Email Form
Email Form
When I try to create an email form in the admin, I get this feedback in the text box:
"<b>Warning</b>: htmlentities() expects parameter 1 to be string, array given in <b>/home/hsc/public_html/_cms/subsub/include/inc_tmpl/content/cnt10.inc.php</b> on line <b>53</b><br />"
Any thoughts?
"<b>Warning</b>: htmlentities() expects parameter 1 to be string, array given in <b>/home/hsc/public_html/_cms/subsub/include/inc_tmpl/content/cnt10.inc.php</b> on line <b>53</b><br />"
Any thoughts?
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
OK found the mistake - only happens if no form field created an error happens that prevents the script to update the db entry -> then form field is an array -> fixed:
in "article.readform.inc.php" line 375 add:
The complete if() part (line 367-376):
Oliver
in "article.readform.inc.php" line 375 add:
Code: Select all
} else {
$content["mailform"] = "";
}
Code: Select all
if (count($content["mailform"])) {
$content["form"] = "";
$mft = 0;
foreach($content["mailform"] as $key => $value) {
$content["form"] .= (($mft) ? "\n" : "") . $content["mailform"][$key]["field"];
$mft++;
}
} else {
$content["mailform"] = "";
}
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Test this here in the textarea - try to fill in all other fields
Code: Select all
IT|vorname|1|Vorname: |40,100|wert|300
IP|passwort|0|Passwort: |12,100||100
TA|info|0|Info: |20,3||300
SM|menu|0|Menü: |20,100|Test#Test2#Test3|300
SL|list|0|Liste: |3,0|1%Test#2%Test2#3%Test3#4%Test4|200
IC|mark|1|Markierung: |50,3|mark1%1%DU#mark2#mark3#Liste#Neu#Auswahl|0
IR|radio|1|Wählen: |50,0|mark1%1%DU#mark2#mark3|0
SC|country|0|Land: |10,100|FR|300
IN|plz|1|PLZ: |40,100||300
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact: