NetTalk Central

Author Topic: Drop list instead of radio button of a local variable on form: how?  (Read 4135 times)

sukhendu

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • Email
How to add a drop list instead of radio button of a local variable on a web form that will show the list of items of the local variable?  Is there an example that shows this?

Thanks,
Sukhendu Barua

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Drop list instead of radio button of a local variable on form: how?
« Reply #1 on: October 26, 2012, 06:02:37 AM »
on the "more settings" of the Drop field, you can capture "fixed" possibilities for the drop - ie not from a file.
So if a radio had say 3 possibilities,
1 - Sold / 2 Rented / 3 Scrapped
then you could add these 3 settings on the "More settings" tab for the Drop and you'd have the same as a radio.

cheers
Bruce

sukhendu

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • Email
Re: Drop list instead of radio button of a local variable on form: how?
« Reply #2 on: October 26, 2012, 12:26:51 PM »
Bruce,

That worked!  Thank you.

Sukhendu

sukhendu

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • Email
Re: Drop list instead of radio button of a local variable on form: how?
« Reply #3 on: October 29, 2012, 06:18:03 AM »
Bruce,
 Is  there a way to prime the list before opening?  What I mean is instead of the first item on the list can the drop list show the item that was last accessed with a different sessionid?  I'm storing the user selection on an ini file and getting the value from the ini file at procedure setup.

Hope I'm able explain what I'm looking for.

Thanks,
Sukhendu

charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Re: Drop list instead of radio button of a local variable on form: how?
« Reply #4 on: October 29, 2012, 06:38:02 AM »
Hi,

Simply p_web.ssv('var','value from .ini file') where you prime the fields.

Cheers
Charl

sukhendu

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • Email
Re: Drop list instead of radio button of a local variable on form: how?
« Reply #5 on: October 29, 2012, 07:15:21 AM »
Thanks Charl,

Priming field in other variables work but not for this local list variable/field where the values are defined under "more settings" .

- Sukhendu

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Drop list instead of radio button of a local variable on form: how?
« Reply #6 on: October 29, 2012, 11:48:34 PM »
I tried it out here Sukendu, and it seemed to work ok.

On the priming tab I set the field to prine to one of the drop _values_ (not the drop text), and of course set it to "Prime for change" if it's a memory form (or if you want it primed on a Change etc).

Cheers
Bruce

sukhendu

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • Email
Re: Drop list instead of radio button of a local variable on form: how?
« Reply #7 on: October 30, 2012, 07:44:54 AM »
I forgot to tick the  "Prime for change" option.  Now it is working.  Thank you Bruce.