Re: Problem with FormBuilder
| From: | Justin Patrin | Date: | Fri, 13 May 2005 16:38:37 +0000 |
| Subject: | Re: Problem with FormBuilder | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19196@lists.php.net to get a copy of this message | ||
On 5/13/05, Adriano de Oliveira Gonçalves <adriano.php@globo.com> wrote:
> Hello!
> I am having a problem with the processing of a form using the FormBuilder.. I am sending below
> the exit of the processing of the form (debug). Somebody makes idea of that it is this? I think
> that this has something about with what I marked in red...
I don't see anything marked in red....however....
>
> FormBuilder: ...processing form data...
> FormBuilder: Field ID
> FormBuilder: is substituted with "".
> FormBuilder: Field ID_TIPO_PROCESSO
> FormBuilder: is substituted with "2".
> FormBuilder: Field ID_CLIENTE
> FormBuilder: is substituted with "3".
> FormBuilder: Field DATA_SOLICITACAO
> FormBuilder: DATE CONVERSION for using callback from Array ...
> FormBuilder:
> _array2date():a:3:{s:1:"d";s:2:"13";s:1:"m";s:1:"5";s:1:"Y";s:4:"2005";}
> to 2005-05-13 ...
> FormBuilder: is substituted with "2005-05-13".
> FormBuilder: Field STATUS
> FormBuilder: is substituted with "Não iniciado".
> FormBuilder: Field ID_FUNCIONARIO_RESPONSAVEL
> FormBuilder: Casting to NULL
> FormBuilder: is substituted with "db_dataobject_cast Object
> (
> [type] => sql
> [day] =>
> [month] =>
> [year] =>
> [value] => NULL
> [hour] =>
> [minute] =>
> [second] =>
> )
This is normal. A null / empty field is cast as NULL.
> ".
> FormBuilder: Field DESCRICAO
> FormBuilder: is substituted with "".
> FormBuilder: Field OBS
> FormBuilder: is substituted with "".
> FormBuilder: Field passo
> FormBuilder: is defined not to be editable by the user!
> FormBuilder: Field Submit
> FormBuilder: is defined not to be editable by the user!
> FormBuilder: Validating data...
I can see from this that you're using validateOnProcess.
>
> Warning: preg_match() expects parameter 2 to be string, object given in g:\Arquivos de
> programas\EasyPHP1-7\php\pear\Validate.php on line 60
>
>
Well, your problem must be that your validation method for one of the
fields is using preg_match. You need to check to make sure the valus
isn't a DB_DataObject_Cast before doing that.
--
Justin Patrin