root/trunk/examples/templates/example_parser_radiogroups.fhtml

Revision 117, 2.6 kB (checked in by argh, 4 years ago)

Massive update of the examples collection; added the patExampleGen examples framework; commented all examples; reworked all the templates...

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <patForms:Form name="foo">
2
3 <div class="piFrame">
4     <div class="piTitle">Area login</div>
5     <div class="piContent">
6        
7         <div class="piAbstract">
8             Please provide your credentials here to log into an area of your choice.
9         </div>
10        
11         <table border="0" cellpadding="2" cellspacing="0">
12             <tr>
13                 <td>Username</td>
14                 <td>
15                     <table cellpadding="0" cellspacing="0" border="0">
16                         <tr>
17                             <td><patForms:String name="username" required="yes" description="Please enter your name here" size="8" maxlength="8" accesskey="U" /></td>
18                             <td>&nbsp;Password&nbsp;</td>
19                             <td><patForms:String name="password" type="password" required="yes" size="6" maxlength="6" accesskey="P" /></td>
20                             <td>&nbsp;Area&nbsp;</td>
21                             <td>
22                                 <!--
23                                     Accessing RadioGroup option attributes:
24                                    
25                                     It is possible to access some of the Radiogroup option attributes in
26                                     the form template via placeholders (a radiogroup is rendered using the
27                                     main patForms String renderer, so you have all the possibilities that
28                                     offers). There are two ways to access an option's attributes:<br><br>
29                                    
30                                     1. Via the automatic naming of options, which follow the scheme PATFORMS_ELEMENT_[RADIOGROUPNAME]_[RADIOGROUPNAME]_OPTION[OPTIONNUMBER]_[ATTRIBUTE],
31                                        e.g. like PATFORMS_ELEMENT_AREA_AREA_OPTION1_LABEL in this example. If you wonder
32                                        why the double name, this is because to be unique, the ID of each option is prepended by
33                                        the name of its parent element.<br><br>
34                                    
35                                     2. By setting the option's id explicitly, you can then access the attributes via [OPTIONID]_[ATTRIBUTE], e.g.
36                                        like ARGH_AREA_LABEL in this example. Needless to say that this ID has to be unique document-wide...
37                                 -->
38                                 <table cellpadding="0" cellspacing="0" border="0">
39                                     <patForms:RadioGroup name="area" clicklabel="yes" label="Area" required="yes" default="1">
40                                     <tr>
41                                         <td><patForms:Option value="1" label="Secret area"/></td>
42                                         <td>{PATFORMS_ELEMENT_AREA_AREA_OPTION1_LABEL}</td>
43                                     </tr>
44                                     <tr>
45                                         <td><patForms:Option value="2" label="Secluded area"/></td>
46                                         <td>{PATFORMS_ELEMENT_AREA_AREA_OPTION2_LABEL}</td>
47                                     </tr>
48                                     <tr>
49                                         <td><patForms:Option id="explicitID" value="3" label="Hidden area"/></td>
50                                         <td>{PATFORMS_ELEMENT_AREA_EXPLICITID_LABEL}</td>
51                                     </tr>
52                                     </patForms:RadioGroup>
53                                 </table>
54                             </td>
55                         </tr>
56                     </table>
57                 </td>
58             </tr>
59         </table>
60     </div>
61 </div>
62
63 <input type="submit" name="save" value="Save" accesskey="S" />
64
65 </patForms:Form>
Note: See TracBrowser for help on using the browser.