Having trouble with table field Renderer boolean depending on name

Sam,

I think you’ll have to modify the code a bit more than expected. Basically, to be able to edit the value of your row based on the checkbox, I think you have to create and add the checkbox to the DOM, so that you can take custom actions when it’s checked or unchecked. This is what I’ve been able to come up with:

var $ = skuid&#46;$, field = arguments[0], value = arguments[1], cellElem = field&#46;element; &#47;&#47; if the field is in read mode if ( field&#46;mode == 'read' ) { &#47;&#47; just use the standard Integer read-mode renderer &#47;&#47; you can customize this as well, if needed skuid&#46;ui&#46;fieldRenderers&#46;INTEGER&#46;read(field,value); } else if (field&#46;mode == 'edit') { &#47;&#47; this function runs whenever the checkbox is clicked function optionClickHandler ( event ) { &#47;&#47; get the new value from the click event, either true or false var newValue = event&#46;target&#46;checked; &#47;&#47;if true (checkbox is checked), update the Quantity field to 1 (or modify this to whatever the value should be) if (newValue) { field&#46;model&#46;updateRow( field&#46;row, field&#46;id, 1 ); } else { field&#46;model&#46;updateRow( field&#46;row, field&#46;id, 0 ); } } &#47;&#47; modify this to fit what you need &#47;&#47; I changed from switch case to if else so you didn't have to duplicate var name = field&#46;row&#46;Name; if (name === "GoPro rental (per day)" || name === "Private guide (per day)") { var v = false; if (value == 1) { v = true; } &#47;&#47; create a checkbox DOM element, making it checked or not based on the value, and attaching the click handler function to it var checkbox = $( '' )&#46;attr('checked', v)&#46;click(optionClickHandler); &#47;&#47; add the checkbox element to the original DOM element so that it shows up on the page checkbox&#46;appendTo( cellElem ); } else { skuid&#46;ui&#46;fieldRenderers&#46;PICKLIST&#46;edit( field, value ); } }<br /><br />

You might need to do some tweaks based on what you specifically want to do, but I think this is headed in the right direction

Thanks!
Amy