NetTalk Central

Author Topic: Possible template bug for Mobile Only form fields?  (Read 2891 times)

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Possible template bug for Mobile Only form fields?
« on: August 07, 2012, 05:35:23 PM »
I am implementing a mobile friendly version of a NT 6.37 site, and noticed that whenever I designate a form fields as 'Mobile Only' in the template, the generated code has an extra 'End' which is being generated and causing the compiler to freak out.  A sample code segment:

Code: [Select]
     if p_web.IsMobile()
        do Refresh::BrowseLineItemsMobile
      Else
        do Value::BrowseLineItemsMobile
          packet = clip(packet) & '</td>'&CRLF
          loc:cellstarted = 0
          do SendPacket
      End ! if p_web.IsMobile()
        if loc:cellstarted
          packet = clip(packet) & '</td></tr>'&CRLF
          loc:cellstarted = 0
        Else
          packet = clip(packet) & '</tr>'&CRLF
        End
        loc:rowstarted = 0
        loc:cellstarted = 0
      end
      do SendPacket

The second last line contains the offending extra 'End'.  I have to put in 'p_web.IsMobile()=0' in the 'Hide Condition' of the field to make it work as expected.

No problems if I use 'Both' or 'Desktop Only'.  The problem only happens in 'Mobile Only'.

Downloading 6.38 now to see if the bug has been fixed.

Cheers,
Devan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11264
    • View Profile
Re: Possible template bug for Mobile Only form fields?
« Reply #1 on: August 08, 2012, 06:54:49 AM »
thanks for the report - fixed in 6.39 Devan.

cheers
Bruce