Modify

Opened 7 years ago

Last modified 5 years ago

#12942 new defect

Default value for textarea input

Reported by: ntmlod Owned by:
Priority: normal Component: ParametrizedTemplatesPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

To get this work, I replace value attribute by placeholder which is probably now the best attribute for this but added with HTML5 standards:

  • parametrizedtemplates/templates/newpage.html

     
    5041        <div class="field">
    5142            <label for="field_${field[0]}">${field[1]}:</label><br/>
    5243            <py:choose test="">
    53                 <textarea py:when="field[2] == 'textarea'" name="field_${field[0]}" id="field_${field[0]}" class="template_textarea" value="${field[3]}"/>
    54                 <input py:otherwise="" type="text" name="field_${field[0]}" id="field_${field[0]}" class="template_text" value="${field[3]}"/>
     44                <textarea py:when="field[2] == 'textarea'" name="field_${field[0]}" id="field_${field[0]}" class="template_textarea" placeholder="${field[3]}"/>
     45                <input py:otherwise="" type="text" name="field_${field[0]}" id="field_${field[0]}" class="template_text" placeholder="${field[3]}"/>
    5546            </py:choose>
    5647            <em>${field[0]}</em>
    5748        </div>

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by Ryan J Ollos

Owner: Álvaro Iradier deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.