NetTalk Central

Author Topic: Checkboxes weird out on mobile device  (Read 1624 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
Checkboxes weird out on mobile device
« on: September 22, 2025, 11:49:13 AM »
HI,
NT14.21 C11.  I have a MemForm with multiple checkboxes ( Yes/no) on them. 
When I sit at desktop computer connected to my server, I can bang on these check box fields and they run true - on, off, on, off, etc.
However, from mobile phones, the check boxes which are normally OFF, will get stuck in the ON position when checked ON.  Repeated attempts to click it will not change it.  Stays ON.
However, If I go to another field and click that one and come back to the one that is stuck ON, I can toggle it OFF.
At first I thought this was network delay in the mobile cell signal however, I am not so sure. 
I have repeated this on multiple cell phones and they all react the same. Sometimes the check boxes work correctly and then sometimes they won't change state.
Any thoughts on this?
THanks,
ROn

osquiabro

  • Hero Member
  • *****
  • Posts: 708
    • View Profile
    • Email
Re: Checkboxes weird out on mobile device
« Reply #1 on: September 24, 2025, 02:47:32 AM »
use checkboxes as buttons

rjolda

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
Re: Checkboxes weird out on mobile device
« Reply #2 on: September 24, 2025, 10:33:01 AM »
HI,
Yes, they are buttons.
Ron

osquiabro

  • Hero Member
  • *****
  • Posts: 708
    • View Profile
    • Email
Re: Checkboxes weird out on mobile device
« Reply #3 on: September 25, 2025, 03:38:05 AM »
Sorry, i meant create a radio buttons. Look example at https://gmd.istpr.com/SolicitudEmpleo

rjolda

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
Re: Checkboxes weird out on mobile device
« Reply #4 on: September 25, 2025, 08:43:02 AM »
HI,
I think I have found the issue.  It seems that there is a TOUCH that is getting implemented on the field and it just keeps the value at 1 ( checked ). 
This is the line: 
https://eppili.net/SetSessionValue?_touch_=1&_ajax_=1     Values: _touch_=1
_ajax_=1

THe normal response to touching the control should be something like this:
https://eppili.net/sm_updatej_srvreq_small_screen_jsrv__serv2request_value?_event_=257&value=0&_ajax_=1&_rnd_=0.9068946294296144

Sooo, I am trying to figure out how the "SetSessionValue?_touch_=1" arises or where it comes from as this seems to be gumming up the works.  I couldn't find it in clarion code. 
Anyone with insight?
Thanks,
Ron

Alberto

  • Hero Member
  • *****
  • Posts: 1891
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Checkboxes weird out on mobile device
« Reply #5 on: September 25, 2025, 11:10:11 AM »
Hi Ron, I think _touch_ has nothing to do with your issue
I was at the webinar today and I think you you should have show Bruce that your issue is only when you use a mobile browser size and not when you use the browser at desktop size, I think may be it has somthing to do with css.
Hope this helps
-----------
Regards
Alberto

rjolda

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
Re: Checkboxes weird out on mobile device
« Reply #6 on: September 25, 2025, 03:18:49 PM »
HI Alberto, 
Thanks for the input.  It may be css but I solved it by making the fields RADIO BUTTONs instead of checkboxes.  The checkboxes were nice but I didn't want the customers to complain that the app was locking them into services that they didn't want by keping them checked "yes".  The YES and NO buttons are not as slick but are clearer.
Thanks,
ROn

rjolda

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
Re: Checkboxes weird out on mobile device
« Reply #7 on: September 26, 2025, 04:02:54 AM »
HI ,
I have 10 line items that the user can select Yes/NO for each item.  I changed the check boxes to Radio buttons  YES and NO.  I set FlexBox layout for the form with Floating Prompt:
On small screens the buttons are centered and each button Yes and No on their own line.  I wanted them to be on the SAME line (horizontal spread) just like on large screens.
NT script:
@media screen and (max-width: 640px) {
    .nt-radio-div-buttons-hor {
        flex-direction: column; 
    }
}
It apparently does this to make sure that all Radio buttons will show.
So, what I did is for MY form container - inside my custom.css:
@media screen and (max-width: 640px) {
    .nt-radio-div-buttons-hor {
        flex-direction: row; 
    }
}
I override the normal small screen behavior and get the buttons on the same line - side by side.
Took a little searching and experimenting but now it works!
Ron
 

rjolda

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
Re: Checkboxes weird out on mobile device
« Reply #8 on: September 29, 2025, 02:21:22 PM »
I found that opening the form as a POPUP made it act weird.
I unchecked the POPUP mode and it settled right down and acted correctly.
Interesting but that is what I found.
Ron