[ic] Problem with form select...

Todd Hight interchange-users@interchange.redhat.com
Tue Dec 18 01:34:01 2001


First let me say that IC rocks and that this list is not only very
informative but quite amusing at times :)

I'm trying to set the default value of a select field on a from (using the
[selected] tag) to an existing value from a table.  Below is a quick snippet
of my form.  The select is always populated correctly I just cant seem to
get it to default to the current values.

All other from fields, mostly text boxes, work fine.  Even the field below
will save the  selected value properly.  In fact, once you complete the
from, the next time you call the page that contains the snippet, you get the
last value selected.

Current config is IC 4.8.3, Apache 1.3.22, Perl 5.6.1, PostgreSQL 7.1.3 all
running on RedHat Linux 7.1 with kernel 2.4.9 SMP.

I'm quite new to IC, just a couple of weeks now. So please be kind :) I'm
sure there is a simple solution!

I hope this all made sense...

TIA

<>< Todd

-----------------------------------------------------

[loop prefix=slist arg="[scratch sprofile_id]"]

        <select name="category" size="1">
          [loop prefix=scat
search="ra=yes/fi=cat/rf=code,name/ml=100/tf=name" ]
            <option value="[scat-data cat name]" [selected name=category
                   value="[slist-data sprofile category]"]>
               [scat-data cat name]
            </option>
          [/loop]
        </select>

[/loop]