Page 1 of 1
					
				Email Form
				Posted: Mon 10. Nov 2003, 22:56
				by sporto
				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?
			 
			
					
				
				Posted: Mon 10. Nov 2003, 23:54
				by Oliver Georgi
				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:
Code: Select all
        } else {
			$content["mailform"] = "";
		}
The complete if() part (line 367-376):
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
 
			
					
				
				Posted: Tue 11. Nov 2003, 16:55
				by sporto
				I made the change mentioned above (is it included in one of the patches>) but it's still not working for me.  I'm not getting the error message, but noting is appearing.  Maybe I'm just using this wrong.
Is the email form meant to create forms on the page?
			 
			
					
				
				Posted: Tue 11. Nov 2003, 16:59
				by Oliver Georgi
				No it's not in a patch (I have forgotten).
You have to fill in some values - check the form info red error message!!!!
It creates forms frontend.
Oliver
			 
			
					
				
				Posted: Tue 11. Nov 2003, 17:04
				by sporto
				I don't get any red errors.  I just get nothing.  It blanks out my text box each time and doesn't add anything.   

 
			
					
				
				Posted: Tue 11. Nov 2003, 17:28
				by Oliver Georgi
				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
 
			
					
				
				Posted: Tue 11. Nov 2003, 17:42
				by sporto
				It works.  Great.  Thanks.
One question... The form takes you to a formmailer page which is in German and is not part of the templated system. Is there a way for it to take you to a basic thank you page?  Is there a thank you tag to include in the form field?
			 
			
					
				
				Posted: Tue 11. Nov 2003, 17:45
				by Oliver Georgi
				The formmailer itself is prepared for such thing - I would rework the formmailer in the way that it is itegrated in the frontend script with also redirection to thank you page.
Oliver