rbf_getFieldValue() defect?

Posted by matman on 25-Sep-2014 04:25

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!

All Replies

Posted by Sven Cuypers on 29-Sep-2014 11:37

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

Posted by matman on 30-Sep-2014 07:01

I have limited access to the support platform, is there anyone who could forward this (defect/suggestion or something like that) for me?

Posted by Sven Cuypers on 30-Sep-2014 09:31

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

This thread is closed