Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

SmartyValidate...[validate plugin] form 'default' is not ...

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
designaholic
Smarty n00b


Joined: 20 Feb 2006
Posts: 2

PostPosted: Mon Feb 20, 2006 8:11 pm    Post subject: SmartyValidate...[validate plugin] form 'default' is not ... Reply with quote

Error: Notice: SmartyValidate: [validate plugin] form 'default' is not registered. in /home/httpd/vhosts/designaholic.de/httpdocs/beta/libs/plugins/function.validate.php on line 47

For both inputboxes Smile

My problem is the following, after sending the form on the page reloads it self - so $_POST isnt empty - i tried to unsert($_POST), but nothing happens. Any idea to solve this prob?
Sessions are started..



index.php
[php:1:4dc1d5b27b]
.
.
.
if(empty($_POST)) {
SmartyValidate::connect($smarty,true);
SmartyValidate::register_validator('kname','name','notEmpty');
SmartyValidate::register_validator('kemail','email','isEmail');

} else { SmartyValidate::connect($smarty);
// validate after a POST
if(SmartyValidate::is_valid($_POST)){
$qry=writeqry("kommentare", "P_ID, Name, Email, URL, Kommentar","'".$_REQUEST['id']."', '".$_REQUEST['name']."', '".$_REQUEST['email']."','".$_REQUEST['url']."','".$_REQUEST['kommentar']."'");
$smarty->assign('abt',"Blog");
$smarty->assign('id', $id);
$smarty->assign('k', "all");
SmartyValidate::disconnect();
} else {
// error, redraw the form
$smarty->assign($_POST);
}
}
.
.
.
[/php:1:4dc1d5b27b]

Code:

<form action="#kommentieren" method="post" class="kommentieren">
   <fieldset>
<legend>Was meinst du zu diesem Thema??</legend>
   <p>Dein Name&*<br /></p>
      {validate id="kname" message="Name kann nicht leer sein"}
      <p><input type="text" name="name" size="10" onfocus="this.value=''" /></p>
   {validate id="kemail" message="Ung&ltige email"}
   <p>EMail&*&(wird nicht ver&ffentlicht)<br /></p>
      <p><input type="text" name="email" size="10" onfocus="this.value='' "/></p>
   <p>URL&*&(http://www.domain.tld)<br /></p>
      <p><input type="text" name="url" size="10" onfocus="this.value=''" /></p>
   <p>Kommentar&nbsp;*</p><br />
   <p><textarea id="textareainput" name="kommentar" cols="50" rows="50">Was meinst du zu diesem Thema?</textarea></p>
   <p><br /><input class="button" type="submit" value="Kommentieren" name="kommentieren" />&&<input class="button" type="reset" value="Zur&cksetzen" name="clear" /></p>
   </fieldset>
   </form>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP