完成视图后,我开始编写控制器代码:
关于选择菜单的几个问题:
如何验证选择菜单 - 我不希望他们能够选择“请选择”</p>
我还能用吗
$this->form_validation->set_rules('','','required');
如何将正确答案发送到控制器?
<label for="hostingRequired">Hosting Required:</label> <select name="hostingRequired"> <option value="pleaseSelect"> Please Select</option> <option value="yes">Yes</option> <option value="no">No</option> </select> <label for="domainRequired">Domain Registration: </label> <select name="domainRequired"> <option value="pleaseSelect">Please Select</option> <option value="yes">Yes</option> <option value="no">No</option> </select> <div id="domainToBeReged"> <label for="domainToBeReged">Domain:</label><input name="domainToBeReged" type="text" placeholder="http://www." /> <label for="domainToBeReged0">Domain:</label><input name="domainToBeReged0" type="text" placeholder="http://www." /> </div>