Changeset 37056 in project


Ignore:
Timestamp:
01/17/19 01:18:40 (3 months ago)
Author:
andyjpb
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/waffle

    r37055 r37056  
    135135
    136136<enscript highlight="scheme">
    137 (add-widget 'invoice-line `((markup . (div (input (@ (name "line-item"))) (input (@ (name "cost))))) (attributes . (()))))
     137(add-widget 'invoice-line
     138            `((markup . (div (input (@ (name "line-item"))) (input (@ (name "cost")))))
     139              (attributes . (()))))
    138140
    139 (add-widget 'invoice `((markup . (div (h1 "Invoice" ,invoice-id) ,@contents (input (@ (type "submit") (name "ok"))))) (attributes . ((invoice-id "0")))))
     141(add-widget 'invoice
     142            `((markup . (div (h1 "Invoice" ,invoice-id)
     143                             ,@contents
     144                             (input (@ (type "submit") (name "ok")))))
     145              (attributes . ((invoice-id "0")))))
    140146</enscript>
    141147
     
    150156
    151157The inputs in the DOM will end up with the following names:
    152 {{{
     158<enscript highlight="scheme">
    153159line1/line-item
    154160line1/cost
     
    158164line3/cost
    159165ok
    160 }}}
     166<enscript>
    161167
    162168This allows your rendering code to compose Form elements in a straightforward way and for the form handling code to work out the structure of the Form that was submitted.
Note: See TracChangeset for help on using the changeset viewer.