Login Retreive lost passwordRegister
Search

Forum Index / NL Forum / using diaeresis

[ This topic is unsolved! ]

  Henk klaasen 26 February 15 / 12:44  
Hello,

If i add a diaeresis somewhere in the email, i cant send the email. How can i solve this?

Thanks for

  Johan Wiegel (Admin) 26 February 15 / 13:03  
FormHandler handles only the form.
What code do you use to send the emial?

  Henk klaasen 26 February 15 / 14:54  
it are 3 pages with forms.
First selecting people
second make e-mail (add subject and content)
third form is a page to confirm subject, content and people, so not really a form

when there are diaeresis in the page, the send function doesnt load (which must be fired when onCorrect is true).

$form->onCorrect("send");
$form->Flush();

ive searched in the isCorrect and the isValid funciton.
The isString and isText functions return 0 when there is a diaeresis in the $value
function IsString($value){
return preg_match("/^[^\x-\x1F]+$/", $value);
}
and
function IsText($value){
return preg_match("/^([^\x-\x1F]|[\r\n\t])+$/", $value);
}
these functions return 0.
when i add return 1; before the return, the value is correct, but then the value is empty.

  Johan Wiegel (Admin) 26 February 15 / 14:58  
The sending is done in the send function.
What is the code for the send function?
Thats going wrong.

  Henk klaasen 26 February 15 / 15:33  
function send($data) {
echo '<pre>';print_r($data);exit;
}
but the function send isnt called when there are diaeresis in the content or subject

  Johan Wiegel (Admin) 26 February 15 / 15:39  
Henk,

<?php
function FH_SEND$aData )
{
    
print_r$aData );
    
}

$form = new FormHandler(); 

$form->textArea("Description""description"FH_TEXT,  ""''"class='s'");
$form->submitButton();
// send the form to the screen 
$form->onCorrect'FH_SEND' );
$form -> flush(); 
?>


is working for me

  Henk klaasen 26 February 15 / 16:20  
I see that the problem is in the last form / confirm page
the code:
$form->newPage();


$form->addHTML("<h1>Leden mailen (Controle en verzenden)</h1>");

$form->borderStart("Te versturen email");
$addressString = "<b>Aan :</b><br/>";
if ((count($form->value("persons"))>0) && ($form->value("Onderwerp")!= "") && ($form->value("Bericht")!= ""))
{
foreach ($form->value("persons") as $id)
$addressString .= $personenData[$id][0]. " [".$personenData[$id][1]."]<br/>";
}
$form->addHTML("<tr><td> </td><td colspan='3' valign='top'>".$addressString."</td></tr>");

$form->addHTML("<tr><td> </td><td colspan='2' valign='top'><b>Onderwerp : </b><br/>".$form->value("Onderwerp")." [ verzonden via domain.nl ]</td></tr>");
$form->addHTML("<tr><td></td><td colspan='3' valign='top'><b>Bericht : </b><br/>".nl2br($form->value("Bericht"))."</td></tr>");

$form->borderStop();
$form->setMask("<tr>\n<td> </td>\n<td> </td>\n<td>%field% %field%</td>\n</tr>\n");
$form->BackButton("Back");
$form->SubmitButton("This is correct -> send");
$form->onCorrect("send");
$form->Flush();

when i click "This is correct -> send", i stay at this page when there is a diaeresis in the content.
but when i skip this summary form page, the form will be send.

  Henk klaasen 02 March 15 / 13:55  
Hi,

Have you found a solution for this problem in the meantime?
I want to hold the confirm page. :)

  Top


powered by PHP-GLOBE   © 2004 - 2024 FormHandler. All rights reserved.   -   Open source license