Forums

How do I make it so that when you click on the question or text next to a radio button, it doesnt change the value of the button?

arrick 07 Apr, 2015
You can see the form I am asking about located at http://mwforms.miworksmo.org/dvop-app.

I would like users to be able to highlight text, or click near text with the mouse without the answer changing in the radio box. (request came from beta testers)
GreyHead 07 Apr, 2015
Hi moorear,

There's a login required to see the form.

Bob
arrick 07 Apr, 2015
your URL brackets broke the link... the link is http://mwforms.miworksmo.org/dvop-app and is a public form... the link generator stripped out the /dvop-app here on me.
GreyHead 08 Apr, 2015
Answer
1 Likes
Hi Moorear,

I'd never noticed that behaviour before - apparently it's there to enable mobile use and is a default for most browsers.

I Googled around and was able to block it with this JavaScript:
jQuery(document).ready(function(jQ) {
  // block the click
  jQ('.gcore-label-checkbox').click(function () {
    window.returnValue = false;
    return window.returnValue;
  });
  // block the 'pointer' cursor
  jQ('.gcore-label-checkbox').css('cursor', 'default');
});

Bob
arrick 08 Apr, 2015
Thanks Bob, where do I put that into the form at?
GreyHead 08 Apr, 2015
Hi Moorear,

In a Load JavaScript action in the form ON Load event.

Bob
This topic is locked and no more replies can be posted.