Standard Code Demo

Demo der Standard Code Ausgabe ohne Veräderungen im typoscript.

Standard Setup Code


# Example content:
Name: | *name = input,40 | Enter your name here
Email: | *email=input,40 |
Address: | address=textarea,40,5 |
Contact me: | tv=check | 1

|formtype_mail = submit | Send form!
|html_enabled=hidden | 1
|subject=hidden| This is the subject
Standard Code beim erstellen einen neuen Formulars

HTML Ausgabe per Standard Rendering


<form onsubmit="return validateForm('mailform','name,Name:,email,Email:','','','')" method="post" enctype="multipart/form-data" name="mailform" id="mailform" action="typo/code-schnipsel/typoscript/cobject/form/">
<div style="display:none;">
 <input type="hidden" value="1" id="mailformhtml_enabled" name="html_enabled">
 <input type="hidden" value="This is the subject" id="mailformsubject" name="subject">
 <input type="hidden" value="XX:tt_content:YY" name="locationData">
</div>
<fieldset class="csc-mailform">
<div class="csc-mailform-field">
 <label for="mailformname">Name:</label>
 <input type="text" value="Enter your name here" size="40" id="mailformname" name="name"></div>
<div class="csc-mailform-field">
 <label for="mailformemail">Email:</label>
 <input type="text" value="" size="40" id="mailformemail" name="email">
</div>
<div class="csc-mailform-field">
 <label for="mailformaddress">Address:</label>
 <textarea rows="5" cols="40" id="mailformaddress" name="address"></textarea>
</div>
<div class="csc-mailform-field">
 <label for="mailformtv">Contact me:</label>
 <input type="checkbox" class="csc-mailform-check" checked="checked" id="mailformtv" name="tv" value="1">
</div>
<div class="csc-mailform-field"> 
 <input type="submit" class="csc-mailform-submit" value="Send form!" id="mailformformtype_mail" name="formtype_mail">
</div>
</fieldset>
</form>
Standard HTML Rendering des oberen Setup Codes ( XX = Seiten UID / YY = Content UID )

HTML Ausgabe ( als Bild )

Die Ausgabe des Formulars sieht per Standard ( im Firefox ) in etwa so aus.

Javascript Validierung

Für die Formular Validierung wird die JS Datei /t3lib/jsfunc.validateform.js verwendet.