5 Replies Latest reply: Sep 11, 2013 3:29 PM by brian_ch RSS

    Fill checkbox based on database value


      I'm running Oracle Apex on apex.oracle.com.


      Need to fill prefill checkboxes based on values in a database.  Checkbox is based on LOV.


      <fieldset id="P1_FOCUS_AREA" class="checkbox_group" tabindex="-1"><legend class="hideMeButHearMe"> … </legend><input id="P1_FOCUS_AREA_0" type="checkbox" value="Science" name="p_v36"></input><label for="P1_FOCUS_AREA_0"> … </label><br></br><input id="P1_FOCUS_AREA_1" type="checkbox" value="Technology" name="p_v36"></input><label for="P1_FOCUS_AREA_1"> … </label><br></br><input id="P1_FOCUS_AREA_2" type="checkbox" value="Engineering" name="p_v36"></input><label for="P1_FOCUS_AREA_2"> … </label><br></br><input id="P1_FOCUS_AREA_3" type="checkbox" value="Mathematics" name="p_v36"></input><label for="P1_FOCUS_AREA_3"> … </label>


      Database is being filled on this js :


      document.getElementById("P1_FOCUS_AREA").options[0].text = obj.P1_FOCUS_AREA;


      Not sure how to get these fields to pre-populate based on value in database.