Inserts a new pair of values into a Web form declared in the dclform section. This function can be used to dynamically modify the content of a Web form.
WebAPI.bdh
WebFormValuePairInsert( in fForm : form, in sLeftValue : string, in sRightValue : string, in nPosition : number optional, in nAttribute : number optional ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
fForm | Web form whose content will be extended by the given pair of values. |
sLeftValue | String representing the left-side value of the pair of values inserted into the Web form. |
sRightValue | String representing the right-side value of the pair of values inserted into the Web form. |
nPosition | Position where the new pair of values is inserted (optional). If this parameter is omitted, the new pair is appended at the end of the Web form. |
nAttribute | Attribute of the pair of values (optional). If this value is omitted no special attribute is assigned. |
dcltrans transaction TMain var sFirstName, sLastName, sPhone: string; begin WebFormValuePairInsert(fForm, "street", "Beach Road"); WebFormValuePairInsert(fForm, "phone", "1212-555-8532", 4, USE_HTML_VAL); WebFormValueGet(fForm, sFirstName, STRING_COMPLETE, "first name"); WebFormValueGet(fForm, sLastName, STRING_COMPLETE, "last name"); WebFormValueGet(fForm, sPhone, STRING_COMPLETE, "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, STRING_COMPLETE, "phone"); write("phone = "); write(sPhone); writeln; WebFormValuePairRemove(fForm, "street"); WebFormClear(fForm); end TMain; dclform fForm: "first name" := "Peter", "last name" := "Heart";
WebForms04.bdf