diff --git a/include/emp/web/Input.hpp b/include/emp/web/Input.hpp index cc36369e28..766cd4cf42 100644 --- a/include/emp/web/Input.hpp +++ b/include/emp/web/Input.hpp @@ -261,7 +261,7 @@ namespace web { Info()->callback_id = JSWrap( std::function( [b_info](std::string new_val){b_info->DoChange(new_val);} ) ); Info()->onchange_info = emp::to_string("emp.Callback(", Info()->callback_id, ", ['checkbox', 'radio'].includes(this.type) ? this.checked.toString() : this.value);"); // Allows user to set the checkbox to start out on/checked - if (in_type.compare("checkbox") == 0 && is_checked){ + if ((in_type.compare("checkbox") == 0 || in_type.compare("radio") == 0) && is_checked) { this->SetAttr("checked", "true"); } }