| 1 | [[PageOutline(2-5,Contents)]] |
| 2 | = Another TracFormsPlugin Tutorial = |
| 3 | For basic information see the [wiki:TracFormsPlugin/Starter beginners part]. |
| 4 | |
| 5 | == Multiple forms per resource == |
| 6 | !TracForms has a way to allow multiple forms within a parent resource (ticket description or wiki page): the ''subcontext''. |
| 7 | Using multiple unique ''subcontext'' IDs you can define a virtually unlimited number of independent forms per parent resource. |
| 8 | Add the ''subcontext'' command with an argument into the form header like this: |
| 9 | {{{ |
| 10 | {{{ |
| 11 | #!TracForm |
| 12 | #!subcontext different_form |
| 13 | |
| 14 | ... field definitions ... |
| 15 | |
| 16 | }}} |
| 17 | }}} |
| 18 | Here we set the subcontext to the id 'different_form'. |
| 19 | This helps the form markup parser find saved field values and know where to put form update information for this form. |