I wrote a little script on one of my pages, in which I had to retrieve the live value of a checkbox on that page. I decided to use the rbf_getFieldValue() function because it has helped me out a lot of times. But when I used it on the checkbox, it only returns 'on'. It doesn't even matter whether the checkbox is checked or not, it will always return 'on'.
Oh, and {!checkbox} returns an image, rather than something like true / false:
<img src="https://www.rollbase.com/prod1/images/notchecked.png" border="0" height="16" width="17">
EDIT: Worked around it using JQuery:
<script> $(function() { $('input[type="submit"]', 'form[name="theForm"]').click(function(e) { e.preventDefault(); if($('input[name="web01_final"]').is(":checked")) { rbf_growlWarning("Final confirmation", "True!"); } else { rbf_growlWarning("Final confirmation", "False!"); } }); }); </script>
Still would like to hear your opinions though!
Hi,
I tested this over here and I do not get the html code returned, but instead I do get the check (V) or unchecked ( ) sign.
I would suggest you submit an idea to get this changed as at this point it is actually displaying the value of the checkbox in the same format.
I've also tested the server-side API getFieldValue() and this does return 'true' or 'false'.
So it does make sense to modify the behavior of rbf_getFieldValue for checkboxes.
Kind regards,
Sven
I have limited access to the support platform, is there anyone who could forward this (defect/suggestion or something like that) for me?
Hi,
You can post this easily on the below page.
I see you've already posted some ideas over here :-)
community.progress.com/.../default.aspx
Cheers,
Sven