Web Form Code

- how to display a web form

How a web form is displayed in a browser is determined by the underlying html code of the web page.

If you are using a wysiwyg (what you see is what you get) html editor to design your web form you may not see much (or any) of the underlying html code. However having a basic understanding of the underlying code is beneficial and particularly relevant for form pages which interact with a form processing script.

The Underlying Form Source Code

The displayed web form is developed using standard html code, just like any web page. Html stands for hyper text mark up language. This is the language that tells a browser (the program you view web pages in like Internet Explorer) what to display.

The code is simply a series of tags containing content. The tags tell the browser what to do with the content. Tags are enclosed between < > and usually have a start tag < > and an end tag </ >. End tags are the same as a start tag with an added /. The content appears between the start and end tag.

The form proper is include between form tags. Within the start form tag the action value tells the form what to do when a submit button is clicked. The action value will be the url of the processing script or when using a Form1 form which includes the processing script within the form file the action will be the form url. A Form1 action can be set as <?php echo $PHP_SELF;?>. This is simply php code for call yourself. Between the form tags are input tags. These display input fields. There are different input types, the most common are "text", "check box", "submit", "reset". To allow inputting a block of text such as a message or comment a text area field is used.

Additional Tutorials on Web Form Code:

bullet Web Monkey

bullet W3 Schools

Viewing the Form Source Code

If you view the source code of a web page you can see the code. You can do this by right clicking a web page and using the View Source or Page Code function of you browser. The Form Source Code page allows you to see the source code of a Simple Form directly in your browser.

It is also worth noting that any web page can be built and edited using a simple text editor like NotePad (included as standard on Windows operating systems). From a text editor you can view web page html code by simply opening the web page file in the text editor. Once open you can edit the web page directly in the text editor and save the changes.

Form Validation

There are a lot of web pages that have dubious underlying code. In many cases browsers attempt to fix or ignore coding errors they find. However to maximize the likelihood of a visitor being able to see your web page the way you intended it's validity should be checked. This is particularly relevant for form pages because they interact with the form processing script. Irregularities in the form html code may prevent correct form processing.

Try the free W3C MarkUp Validation Service or the WDG HTML Validator to check form validation. While many (most?) web pages will fail high level validation, validating your web page will highlight common items like missing or extra tags that definitely require attention. It also increases the chances your site will continue to function in new release browsers, will enhance internet content and support the development of consistent web standards thereby improving the effectiveness and efficiency of the internet. You can check the validity of this page by simply clicking the W3C XHTML image at the below.

<<< ezyForm Home Page Form Source Code >>>



Client Comments

"This was my first software purchase over the internet. I am very please with the results."

"Whole transaction and result well done."

"Thank you sir for your prompt response and excellent service."

"You guys are fantastick ...excellent service each and every time, without fail."

"...you guys were great!"

"Keep up the good work!!"

"Great as usual, Thanks."

"I really appreciate your time and responsiveness... I'll definitely be back to your site soon."

"I like the simplicity and layout of your product."

ezyForm