HTML模型对话框问题

时间:2017-02-22 10:00:45

标签: html

下面是我的对话代码,问题是当我提交它时不显示错误并且它已关闭 我想在那个表单上出错。 我已经使用了表单验证,它不起作用,它只适用于这个特定的模型

<div class="modal fade" id="modal1" data-open-click="true" data-open-delay="2500" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12">
                        <h2 class="heading"><span class="color2">FEEDBACK </span>FORM</h2>

                        <form role="form" action="<?php echo base_url();?>home/add_record" method="post">
                            <div class="form-group">
                                <label for="contact-name">Name</label>
                                <input name="name" id="<?php if(isset($record[0]['feed_name'])){echo $record[0]['feed_name'];}?>" type="text" class="form-control" value="<?php if(isset($record[0]['feed_name'])){ echo $record[0]['feed_name']; }else{ echo set_value('name'); } ?>">
                                <div class="clearfix"></div>
                                <?php if(form_error('name')!=""){ echo form_error('name');} ?>
                            </div>
                            <div class="form-group">
                                <label for="mobile">Mobile</label>
                                <input name="mobile" id="<?php if(isset($record[0]['feed_mobile'])){echo $record[0]['feed_mobile'];}?>" type="text" class="form-control" value="<?php if(isset($record[0]['feed_mobile'])){ echo $record[0]['feed_mobile']; }else{ echo set_value('mobile'); } ?>">
                            </div>
                            <div class="form-group">
                                <label for="email">Email ID</label>
                                <input name="email" id="<?php if(isset($record[0]['feed_email'])){echo $record[0]['feed_email'];}?>" type="text" class="form-control" value="<?php if(isset($record[0]['feed_email'])){ echo $record[0]['feed_email']; }else{ echo set_value('email'); } ?>">
                                <div class="clearfix"></div>
                                <?php if(form_error('email')!=""){ echo form_error('email');} ?>
                            </div>
                            <div class="form-group">
                                <label for="feedback">Feedback</label>
                                <textarea class="form-control" id="feedback" name="feedback" rows="3"><?php if(isset($record[0]['feed_desc'])){ echo $record[0]['feed_desc']; }else{ echo set_value('feedback'); } ?></textarea>
                            </div>
                            <button type="submit" class="btn btn-success">Submit</button>
                            <a href="<?php echo base_url();?>" class="btn btn-danger"> Cancel </a>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

0 个答案:

没有答案