Forums

Republish Server Side Validation

tart 11 Aug, 2009
Hi,
I use Forms (3.1 RC5.5) and use the server siDe validation. But Republish fields after Server Side validation does not work. What is wrong? I try to find the answer in these forum, but unfortunately, I didn´t find the solution of my problem.

I give: Republish fields if error occured YES,
Javascript Live Validation: Enable Validation: NO (i tried "YES - but with the same result).

How to republish data with server side validation? Thank you very much for your help!

My Server Side Validation php script is:
<?
if (empty($_POST['adresat']))
{
  return 'Prosím, vyplňte platnou e-mailovou adresu.';
}
elseif (preg_match('/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i', $_POST['adresat']) == 0)
{
  return 'Neplatná e-mailová adresa: ' . $_POST['adresat'];
}
?>
<?php
if(empty($formVars["jmeno"]))

return 'Prosím, vyplňte Vaše jméno.';
?>
<?php


if (empty($_POST['telefon']))
{
  return 'Prosím, uveďte Váš telefon v číselném formátu (např. 420123456789)';
}
elseif (preg_match('/^[0-9]{1,}$/',$_POST['telefon']) ==0)
{
  return 'Špatný formát telefonního čísla: ' . $_POST['telefon'];
}
?>
<?php
if(empty($formVars["ulice"]))

return 'Prosím, vyplňte v kolonce Adresa Vaši ulici a číslo popisné.';
?>
<?php
if(empty($formVars["mesto"]))

return 'Prosím, vyplňte v adrese "Město".';
?>
<?php
if(empty($formVars["psc"]))

return 'Prosím, vyplňte ve Vaší adrese PSČ.';
?>
This topic is locked and no more replies can be posted.