NetTalk Central

Author Topic: Radio buttons - How to select one item on opening  (Read 3031 times)

Edvard

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • BB-Soft
    • Email
Radio buttons - How to select one item on opening
« on: February 09, 2011, 11:30:09 PM »
On a browse i have a radio with 3 options:
All
This month
From today and rest of your life

If i set the radio buttons, it sets a filter, and it works like a charm.
My problem is, that i want to set the radio button 'This month' to the default - Its 'all' thats default.
How to?

Cheers!
Edvard Korsbæk

charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Re: Radio buttons - How to select one item on opening
« Reply #1 on: February 10, 2011, 02:05:18 AM »
Edvard,

Assign values to the Radio options:

All = 1
This month = 2
From today and rest of your life = 3

Then in the embed point Generate Form - Start put something like this.

  if p_web.gsv('l:StatusC') = 0         ! If you do not want to overwrite the status if it is already set
    p_web.ssv('l:StatusC',2)
  .

You probably don't have to assign values then p_web.ssv('l:StatusC',2) becomes p_web.ssv('l:StatusC','This month').


Cheers
Charl