Gossamer Forum
Home : General : Perl Programming :

...losing my description...

Quote Reply
...losing my description...
(Sung to to the tune of Losing My Religion by REM...) Shocked

Anyway, here's the situation: using Links 2, working with modify.cgi that includes Paul's Modify Protection & Auto Filler mod. It works fine, but on the modify page, the Description field comes up empty, though all other fields are pre-filled as they should be. What's really strange is that when I view the page source, the description is there!

<td><textarea wrap="virtual" name="Description" value="carry the desc over!" rows="3" cols="42"></textarea></td></tr>

Any idea why this would happen??


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] ...losing my description... In reply to
If I put the description tag <%Description%> in the modify form, without being in a textarea, it displays the correct value. If I view the link from the Admin screens, the description is there, too. But not in the modify form, and if left empty and submitted, the field is then written as empty in the db. Too strange!
Unsure


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] ...losing my description... In reply to
You need to be doing something like this:

<textarea wrap="virtual" name="Description" rows="3" cols="42"><%Description%></textarea>

----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln
Quote Reply
Re: [dan] ...losing my description... In reply to
It has the stock code except for the addition of the <%Description%> tag:

<tr><td align="right" valign="top">Description:</td>
<td><textarea wrap="virtual" name="Description" value="<%Description%>" rows="3" cols="42"></text-area></td></tr>


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] ...losing my description... In reply to
What Dan said is right.

Seems like you are just making a small mistake in HTML.

For textarea You should use the code as below

Code:
<textarea> <%description%> </textarea>

Feel free to use any style, or other information along with textarea, however just as Dan said, make sure to place <%description%> in right place.

Here is updated code for you.

Code:
<tr><td align="right" valign="top">Description:</td>
<td><textarea wrap="virtual" name="Description" rows="3" cols="42"><%Description%></textarea></td></tr>

See I have updated the Value option & moved description tag where it should be?

Hope this helps.

Vishal
-------------------------------------------------------

Last edited by:

SWDevil.Com: Nov 30, 2009, 11:29 PM
Quote Reply
Re: [PerlFlunkie] ...losing my description... In reply to
Try:

Code:
<tr><td align="right" valign="top">Description:</td>
<td><textarea wrap="virtual" name="Description" rows="3" cols="42"><%Description%></textarea></td></tr>

Notice in your example, you were closing the <textarea> with </text-area> Wink The content of the textarea also needs to be between the tag (not in the value="" area).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] ...losing my description... In reply to
Boy, that code-blindness is gettin' bad! Crazy

On a good note, the Image Upload mod is working well, and fully integrated into the admin. Now just need to make it a multi-file upload...

Thanks!


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] ...losing my description... In reply to
The other point about...

Quote:

Notice in your example, you were closing the <textarea> with </text-area>


That's the way it's set up in the template, but the dash is removed for the actual page, because having a </textarea> tag inside a textarea closes the textarea. Went through that problem while making the External Text File mod...


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Dec 1, 2009, 1:56 PM