NetTalk Central

Author Topic: How to Hide and UnHide a Radio Option  (Read 78 times)

Johan de Klerk

  • Full Member
  • ***
  • Posts: 225
  • Johan de Klerk
    • View Profile
    • Designer Software
How to Hide and UnHide a Radio Option
« on: September 15, 2026, 03:05:06 AM »
Hi,

I have a local variable: Loc:VehicleType
In this variable I have 6 options:
Option1 = Option 1
Option2 = Option 2
Option3 = Option 3
Option4 = Option 4
Option5 = Option 5
Option6 = Option 6

I am resetting this variable based on another selection made on the form.
There is a READ-ONLY IF CONDITION prompt on the template in the Option1 -> 6.
The READ-ONLY works and makes the Radion Option1 -> 6 Read-Only.
However I want to Hide Option1 -> 6 depending on the selection made on the other variable.

Is this possible and how would I do this.

Any help and suggestions would be appreciated.

Regards

Johan de Klerk
Clarion 10, NT 11.57. NT 14

Jane

  • Sr. Member
  • ****
  • Posts: 438
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: How to Hide and UnHide a Radio Option
« Reply #1 on: September 15, 2026, 07:23:44 AM »
What I would try:

For each of the options, in the CSS for that option use an expression like (this is pseudo-code)

Code: [Select]
CHOOSE(p_web.GSV('hide option variable'),' nt-hide','')

rjolda

  • Sr. Member
  • ****
  • Posts: 463
    • View Profile
    • Email
Re: How to Hide and UnHide a Radio Option
« Reply #2 on: September 15, 2026, 09:16:41 AM »
Hi,
I have a radio on a MemForm.  I have 7 options: 
Text: p_web.GSV('autoInfo1')  through ....  p_web.GSV('autoInfo7')
For each one I set the Include Conditon:  p_web.GSV('autoInfo1')<> ''   through .... p_web.GSV('autoInfo7')<> ''
So, I read my data and fill in each p.web.SSV('autoInfo1', mydata)   for each one that I need.
It is not a matter of hiding or unhiding - it is a matter of does the data exist - if yes, then the variable has a value.  If not, the variable has no value and thus is not included.
HTH,
Ron

Johan de Klerk

  • Full Member
  • ***
  • Posts: 225
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: How to Hide and UnHide a Radio Option
« Reply #3 on: September 15, 2026, 09:29:28 PM »
Hi Jane/Ron,

Thanks for your suggestions.

I have a lot of conditions to check and then Hide or not Hide some of the Radio Options.
I eventually created a Routine with this code:
p_web.script('$(''label[for="Loc__VehicleType_1"]'').hide();')
or
p_web.script('$(''label[for="Loc__VehicleType_1"]'').show();')

From my test so far it seems to work 100%.

Regards

Johan de Klerk
Clarion 10, NT 11.57. NT 14