Contact | Privacy | Datenschutzerklärung | Impressum

Form Fields

There is a global object variable named ff. If a heitml page is called from a form, ff contains the values of the form fields (or in HTML speak: the values of all successful controls). A form field named "fieldname" can be accessed by ff.fieldname.

FORM fields can have a name of the form x.y, where x and y are strings. Then ff has an attribute named x, which itself is an object with an attribute y containing the field value. This way FORM fields can be structured into different objects. It also works recursively if more than one point is contained in the name. In the special case of an empty y (the name has the form x.) ff contains an object named x with an unnamed field.

If a form field name "fieldname" occurs multiple times on a FORM then component ff.fieldname holds the value of the latest submitted occurrence. However if the form field name is of the form x. the object created for x contains unnamed fields one for each occurrence submitted. So with other words ff.x becomes an heitml array that contains all the submitted fields values. This feature must be used to handle select boxes with the multiple option.

heitml does all URL processing automatically, including all necessary character translation. The following URLs result in the following content of ff:

URLff
x=1&y=2
x="1"
y="2"
x.a=1&x.b=2&y=2
x=(a="1", b="2")
y="2"
x=1&x=2
x="2"
x.=1&x.=2
x=([0]="1", [1]="2")
greeting=Hello+World%21
greeting=Hello World!

FORM fields of type FILE together with FORM ENCTYPE="multipart/form-data" and METHOD=POST (Form-based File Upload in HTML, see RFC 1867) cause ff to have a component with the name of the FORM field. This component is an object with fields filename, contents, Content-Type and Content-Range. Field filename denotes the name of the file on the client, field contents contains the file contents as a binary string and field Content-Type the MIME type of the file. Content-Range is not defined with a HTTP/1.0 or earlier request, but it is an object with fields first_byte_pos, last_byte_pos and entity_length with HTTP/1.1 requests.

Cookies sent by the client are stored as an object in ff._cookie. Then, a cookie with name crumb can be accessed through ff._cookie.crumb which is also an object.


This page was dynamically generated by the web application development tool RADpage of H.E.I. Try the AJAX Article (in German) on www.h-e-i.de.
© 1996-2024 H.E.I. All Rights Reserved.



Homepage
Intro/Features
Component Guide
Programming
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    Expressions
    Objects
    Methods
    Classes
    heitml Tags
    heitml Functions
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    Sessions
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  Tutorial
  New Features
  heitml 1
User Guide
Services
Privacy
Datenschutz
 
Contact / Impressum