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

Formcat (client-side validation) cannot find posted data

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


Joined: 07 Mar 2007
Posts: 3

PostPosted: Mon Mar 26, 2007 10:04 am    Post subject: Formcat (client-side validation) cannot find posted data Reply with quote

Hey guys,


Very good job u did here...
Using smarty since not so long but happy with it.

Since weeks i'm using Formcat 1.04 from Joey. But I'm getting problems to access to my posted data from any form validated with Formcat... This make my crazy.

Here is a part of my php: test_post.php
Code:

//   CHECK PARAMETERS POSTED --------------------------------------------------------------------
if (isset($_POST['btnLogin'])) {
   $bouton = $_POST['btnLogin'];
   if(!empty($bouton)) {
      // ----- Manage Login try -------
      echo 'LOGIN: ' . $bouton;
      exit();
   }
}

I'm doing that in that way because I need many forms on a page.

Here is one of my forms tpl:
Quote:

{catform FORM="frmLogin" flashFocus="TRUE" submitOnce="TRUE"}
<form name=frmLogin id=frmLogin action="test_post.php" method="post">
<p>
<div style="background-color:#2D0C1D; font-weight:bold; color:#FFFFFF; height:26px; padding-top:5px; padding-bottom:5px">&nbsp;Votre compte</div>
<p>
<div style="padding-left:20px">
<table width="760" border="0">
<tr>
<td width="160">Pseudo&nbsp;<span class="formMandatory">*</span></td>
<td width="250"><input type="text" name="Login" size="25" maxlength="20" /></td>
<td></td>
{formcat check="notEmpty" field="Login" message="vous devez saisir votre pseudo" focus="true"}
</tr>
<tr>
<td>Password <span class="formMandatory">*</span></td>
<td><input type="password" name="Password" size="25" maxlength="20" /></td>
<td><input name="btnLogin" type="submit" value="Connecter" /> </td>
{formcat check="notEmpty" field="Password" message="vous devez saisir votre mot de passe" focus="true"}
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</div>
</form>
{/catform}

1-> when I'm activating validation inside main form => Nothing append test_post.php do not see my pressed button (variable) !!

Crying or Very sad

2-> when commenting validation from main form like that:
Code:

//$fc = new formcat;
//$smarty->register_outputfilter(array(&$fc,'fcOutputFilter'));

-> test_post.php is able to handle posted data !!

What's going on Question
Do I made mistakes Question

Many thanks to all of U.
Vincent.
Back to top
View user's profile Send private message Visit poster's website
vmegag
Smarty n00b


Joined: 07 Mar 2007
Posts: 3

PostPosted: Sat Mar 31, 2007 8:32 am    Post subject: Reply with quote

OK, guys...

Here is the explanation (simple):

Since i'm using the functionality submitOnce="TRUE"} -> the submit button that i'm trying to get when form is posted, is basically desactivated then NOT TRANSMITTED when POSTED !!
Sounds like a nooby mistake. Embarassed

Anyway the alternative is to use hidden fields, since they are transmitted correctly via a post Idea

Thanks anyway.
Vincent.
Back to top
View user's profile Send private message Visit poster's website
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