NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Edvard on February 09, 2011, 11:30:09 PM

Title: Radio buttons - How to select one item on opening
Post by: Edvard 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
Title: Re: Radio buttons - How to select one item on opening
Post by: charl99 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