Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Links table editor

Quote Reply
Links table editor
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?
Quote Reply
Re: [knewt] Links table editor In reply to
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.
Quote Reply
Re: [pugdog] Links table editor In reply to
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.