NetTalk Central

Author Topic: Default selection in drop field  (Read 4854 times)

oeb

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Default selection in drop field
« on: November 15, 2007, 04:23:22 AM »
I have a drop field with an additional choice before the file records (under 'more settings'). However, the first field in the file is still used as default choice.  Looking into the generated HTML source code both the additional choice and the first field is marked as SELECTED which of course isn't right. Could this be a bug in Nettalk or is there a setting for this that I haven't found? 
--------------------
Ole

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: Default selection in drop field
« Reply #1 on: November 15, 2007, 07:59:34 AM »
Do you give the additional item a unique value?
Does this happen on insert or edit or both?
are you priming that field on insert with a value other than the first one?

I do the same thing - I add "select a fuel type" with a value of 0 before the items from the file. Seems to work fine.
Real programmers use copy con newapp.exe

oeb

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Re: Default selection in drop field
« Reply #2 on: November 16, 2007, 12:38:09 AM »
The additional field is an empty text field.

This is what appears in the HTML source:
<option value="" selected="selected" class="SelectList1">Option1</option>
<option value="ExampleText" selected="selected" class="SelectList2">Option2</option>
<option value="ExampleText2" class="SelectList1">Option3</option>

As you see, both the first options are marked as selected.

This happens when the page is loaded the first time. On subsequent loads it will correctly remember the selection from last time (if changed), with only one item selected. So how can I set this default selection manually for the first load?
--------------------
Ole

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Default selection in drop field
« Reply #3 on: November 16, 2007, 04:54:32 AM »
looks like a bug, I'll look into it.

Cheers
Bruce