WebFormClear Function

Action

Removes all entries from a Web form declared in the dclform section. This function can be used to dynamically modify the content of a Web form.

Include file

WebAPI.bdh

Syntax

WebFormClear( inout fForm: form ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
fForm Web form whose entries will be removed

Example

dcltrans
  transaction TMain
  var
    sFirstName, sLastName, sPhone: string;
  begin
    WebFormValuePairInsert(fForm, "street", "Beach Road");
    WebFormValuePairInsert(fForm, "phone", "1212-555-8532");
    WebFormValueGet(fForm, sFirstName, sizeof(sFirstName),
      "first name");
    WebFormValueGet(fForm, sLastName, sizeof(sLastName), "last name");
    WebFormValueGet(fForm, sPhone, sizeof(sPhone), "phone");
    write("first name = "); write(sFirstName); writeln;
    write("last name = "); write(sLastName); writeln;
    write("phone = "); write(sPhone); writeln;
    WebFormValueSet(fForm, "phone", "1411-555-0969");
    WebFormValueGet(fForm, sPhone, sizeof(sPhone), "phone");
    write("phone = "); write(sPhone); writeln;
    WebFormValuePairRemove(fForm, "street");
    WebFormClear(fForm);
  end TMain;

  dclform
    fForm:
    "first name" := "Peter",
    "last name" := "Heart";

Sample scripts

WebForms04.bdf