Printable Version
 Updates

 Documentation

 Support & Training

 Community
  Online Forum
  Newsgroups
Retrieving the Value of a Submitted Record Form Field.

Products:   
Areas: ASP, ASP.NET(C#), ColdFusion, Java Servlets, JSP, Perl, Perl 

When values in a record form are submitted for Insert, Update or Delete operations, the server side code for the record form captures the submitted values and uses them to create variables. These variables can be accessed in the server events that occur after a record form's submission. Such events include the Before and After Insert events as well as the corresponding events of the Update and Delete operations. Among other things, these events are frequently used to manipulate the submitted values or use the values to create and execute custom SQL queries. This article shows how to retrieve the values of submitted form fields in different languages.

In all of the examples below, note the following representative variables and what they stand for. In your actual code, substitute these variables with the actual names of the entity they represent.

FormName - The name of the record form containing the submitted form field
FieldName - The name of the form field containing the submitted value
VariableName - The name of the variable that will be used to hold the value of the submitted form field

ASP
Dim VariableName
VariableName = FormName.FieldName.Value

ASP.Net(C#)
VariableName = FormNameFieldName.Text;

Cold Fusion
<CFSET VariableName = FieldName>

PHP
$VariableName = $FormName->FieldName->GetValue();

PERL
$VariableName = $FormName->{FieldName}->GetValue();

JSP and Java Servelets
VariableName = ((com.codecharge.components.TextBox) ((com.codecharge.components.Record) (e.getPage().getChild( "FormName" ))).getChild( "FieldName" )).getValue(); //Assuming that the field submitting the value is a Text Box field.



Viewed 24419 times.   Last updated: 8/6/2002 1:18:28 AM