How to dd some "boilerplate" text to the text box on only the creation of a new issue.
Currently, the text area is constructed using::
<textarea tal:content="request/form/@note/value | default"
name="@note" wrap="hard" rows="5" cols="80"></textarea>
Note that this construction already handles there being some default text in the template - that's what the "| default" bit does. If there's no @note request variable present, you will get the default text that appears in the tag in the template.
Now, to test whether we're presenting this widget for issue creation or issue editing, we need to add a test for "context/id" (it'll be blank if we're creating the issue). Then on the widget that is active for the edit form, we add some default text::
<textarea tal:condition="context/id"
- tal:content="request/form/@note/value | default"
name="@note" wrap="hard" rows="5" cols="80"></textarea>
<textarea tal:condition="not:context/id"
- tal:content="request/form/@note/value | default"
name="@note" wrap="hard" rows="5" cols="80">Describe the fault
fill in the blanks</textarea>
- tal:content="request/form/@note/value | default"
... and you're done.