bouvet
Posts: 24
|
Posted: 03/06/2004, 9:19 AM |
|
Hello,
I need to write with Php a small function
::: if the field "group_id" is empty write "1" in the field. It will include in a before load event.
This field must contain a number
Thank you
_________________
Webdesign Hildesheim Hannover
http://www.actidesign.com |
|
|
rhostager
|
Posted: 03/06/2004, 4:54 PM |
|
global $my_form_name;
if ($my_form_name->group_id->GetValue() == "") {
$my_form_name->group_id->SetValue("1");
}
Substitue the actual name of your form into $my_form_name. If the name of your form is 'employees' then the first line of code would be:
global $employees;
Hope this helps,
- Rob
|
|
|
RonB
|
Posted: 03/08/2004, 10:59 AM |
|
On Sat, 06 Mar 2004 09:19:22 -0800, bouvet wrote:
> Hello,
> I need to write with Php a small function
>
> ::: if the field "group_id" is empty write "1" in the field. It will include in a before load event.
>
> This field must contain a number
>
> Thank you
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
You could also set it as a parameter in the query wizzard with default
value 1 . If no parameter is passed through url the 1 value will be used.
No need to use a function
RonB
|
|
|
|