Topic: Validate fields

Hi,

I would like to know how i can go about validating fields from our invoice for example.

We want a situation where users must select the same branch, price lists and dimension. We want FA to be able to warn the user if 1. they fail to pick any of these fields and 2. to ensure that the fields picked match.

Any ideas on how to go about this please?

Re: Validate fields

something like this, i think at the beginning of the page:

     if (strlen($_POST['dimension']) == '') 
    {
        $input_error = 1;
        display_error( _("The dimension name must be entered."));        
        set_focus('dimension');
    }

if you want to force the user to choose a specific value  in particular, the best way is to use hidden or an output field where the user can't modify it.

abdelghani