我已經創建了一個表單,當某個複選框被選中時啓用文本框,但是我在表單中輸入的文本沒有存儲在我的Classipress/wordpress安裝中。我需要做些什麼來修復此代碼,以便將用戶在文本框中輸入的內容存儲起來?複選框已勾選啓用文本框
<li>
<div class="labelwrapper">
<label>Certifications: </label>
</div>
<ol class="checkboxes">
<li>
<input type="checkbox" name="cp_certifications_list" id="cp_certifications_1" value="TEFL" class="checkboxlist " onclick="addRemoveCheckboxValues(this, 'cp_certifications_value')"> TEFL </li> <!-- #checkbox -->
<li>
<input type="checkbox" name="cp_certifications_list" id="cp_certifications_2" value=" TESOL" class="checkboxlist " onclick="addRemoveCheckboxValues(this, 'cp_certifications_value')"> TESOL </li> <!-- #checkbox -->
<li>
<input type="checkbox" name="cp_certifications_list" id="cp_certifications_3" value=" CELTA" class="checkboxlist " onclick="addRemoveCheckboxValues(this, 'cp_certifications_value')"> CELTA </li> <!-- #checkbox -->
<li>
<input type="checkbox" name="cp_certifications_list" id="cp_certifications_4" value=" ESL Degree" class="checkboxlist " onclick="addRemoveCheckboxValues(this, 'cp_certifications_value')"> ESL Degree </li> <!-- #checkbox -->
<li>
<input type="checkbox" name="cp_certifications_list" id="cp_certifications_5" value=" Teaching Certificate" class="checkboxlist " onclick="addRemoveCheckboxValues(this, 'cp_certifications_value')"> Teaching Certificate </li> <!-- #checkbox -->
<li>
<input type="checkbox" name="cp_certifications_list" id="cp_certifications_6" value=" English Degree" class="checkboxlist " onclick="addRemoveCheckboxValues(this, 'cp_certifications_value')"> English Degree </li> <!-- #checkbox -->
<li>
<input type="checkbox" name="cp_certifications_list" id="cp_certifications_7" value=" Other" class="checkboxlist " onclick="document.getElementById('cp_certifications_8').disabled=(this.checked)?0:1"> Other </li> <!-- #checkbox -->
<li>
<input name="cp_certifications_list" id="cp_certifications_8" type="text" minlength="2" value="" class="text " disabled /></li>
<input type="hidden" name="cp_certifications" id="cp_certifications_value" value="" style="display:none;" />
</ol> <!-- #checkbox-wrap -->
<div class="clr"></div>
</li>
首先,我會考慮這裏的標記。你有一個有序的列表 - 列表項的內容。這真的有必要嗎?其次,您在這裏沒有提供足夠的標記。
這是一個鏈接到整個表單粘貼,它很長,這就是爲什麼我沒有彈出它在這裏:http://pastebin.com/8M9PmAAN – drewrowalnd