I want to have a default value in my Description box so that when users are adding Descriptions they follow the format I want. The Links table editor won't allow me to add a default description to the Descriptions column. Any suggestions?
Sep 28, 2001, 2:32 AM
Veteran / Moderator (6956 posts)
Sep 28, 2001, 2:32 AM
Post #2 of 3
Views: 1242
You can do it in the template.
I guess the "TEXT" fields don't have a default value ? (unless it's a bug).
You can give a TEXTAREA field a default value by enclosing the default text between the opening and closing TEXTAREA tags, similar to how you'd display the value of that field.
You could reuse the same template field by using <%if%> tags.
<TEXTAREA wrap="virtual" name="Description" rows="3" cols="42">
<%ifnot Description%>
default text here
<%else%>
<%Description%>
</TEXTAREA>
On a new entry, the Description field would be empty. your default text would be used. Once a link has been added, it will have a value (even if it's your default text) and the actual value of the field will be used.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
I guess the "TEXT" fields don't have a default value ? (unless it's a bug).
You can give a TEXTAREA field a default value by enclosing the default text between the opening and closing TEXTAREA tags, similar to how you'd display the value of that field.
You could reuse the same template field by using <%if%> tags.
<TEXTAREA wrap="virtual" name="Description" rows="3" cols="42">
<%ifnot Description%>
default text here
<%else%>
<%Description%>
</TEXTAREA>
On a new entry, the Description field would be empty. your default text would be used. Once a link has been added, it will have a value (even if it's your default text) and the actual value of the field will be used.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
Sep 28, 2001, 4:45 PM
Administrator (9387 posts)
Sep 28, 2001, 4:45 PM
Post #3 of 3
Views: 1225
Missing an endif tag there. =) Try:
<TEXTAREA wrap="virtual" name="Description" rows="3" cols="42">
<%if Description%><%Description%>
<%else%>
Your default text here.
<%endif%>
</TEXTAREA>
Cheers,
Alex
--
Gossamer Threads Inc.
<TEXTAREA wrap="virtual" name="Description" rows="3" cols="42">
<%if Description%><%Description%>
<%else%>
Your default text here.
<%endif%>
</TEXTAREA>
Cheers,
Alex
--
Gossamer Threads Inc.