NetTalk Central

Author Topic: Which Embed?  (Read 2581 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • Email
Which Embed?
« on: September 13, 2023, 07:07:28 PM »
I Have a NetWeb Form with two tabs
On one of the tabs I have radio buttons
I want one of the radio buttons to be conditionally selected when the tab opens ( currently the radio button is selected manually)
Where do I insert the following code please?

 I have tried in the TabChanged embed which doesnt work and also afterPrimes  but this last option opens the tab automatically.
 lBreaktype is already primed
!conditionally set Meal Start
!Breaktype 3 is the radio button option for Lunch out and 4 is the lunch IN option

 IF p_web.GSV('TakesTeaBreaks') = 0
       if  p_web.GetSessionValue('loggedIn') = 1
           lBreakType = 3
           p_web.SetSessionValue('lBreakType',3)         
       elsif  p_web.GetSessionValue('LoggedIn') = 0
           lBreakType = 4
           p_web.SetSessionValue('lBreakType',4) 
        end
  END             

Thanks
Richard
« Last Edit: September 13, 2023, 07:19:59 PM by Richard I »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Which Embed?
« Reply #1 on: September 14, 2023, 02:50:20 AM »
1. Add a "Prime" to the primig tab
2. go to the embeditor, find the prime you added (priming to xxx can make it easier to find)
3. Add your hand-code there
4. remove the prime added in 1.

Cheers
Bruce