Another typo on my part in my example...  I had selected in my actual
code but anyway...

I found out what the problem was.  The lookup values used in the select
list were uppercase, the retrieved values from the database were
lowercase.  Restoring %fdat worked once I made the cases match.

I have a similar problem with a month select list, but I believe this is
caused by having values like "01" being retrieved and the select list
containing "1".

Gerald Richter wrote:
> 
> > I have a routine that restores %fdat to the stored data values in the DB
> > so users can come back and edit a form, but I can't figure out how to
> > get select lists restored.
> >
> > I tried the following:
> >
> > <OPTION VALUE="[+ $abr=$STATE_ABBREVIATIONS[$row]+]"[$ if( (defined
> > $fdat{'state'})
> > && ($fdat{'state'} eq $abr) )$] SELECT[$ endif $]>
> >
> > but this doesn't reset "state" to the value that was retrieved from the
> > database.
> 
> Must be "SELECTED" and not SELECT, but it should be enought to simply set
> %fdat to the same values as it was before and Embperl will automaticly
> insert the SELECETED attribut to your OPTION tags.
> 
> Gerald

--
__________________________________________________________
Mr. Erich L. Markert                     [EMAIL PROTECTED]
Computer Learning Center                 TEL (914)422-4328
Pace University
1 Martine Ave
White Plains, New York 10606-1932

Those who do not understand Unix are condemned to reinvent it, poorly.
                -- Henry Spencer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to