归档值使用复选框意外更改 [英] Filed values changes unexpectedly using checkbox

查看:83
本文介绍了归档值使用复选框意外更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有多个复选框及其字段名称,但是我不知道我在哪里做错了字段更改的名称,我无法找出问题出在哪里.

I have multiple checkbox and their field name but i dont know where i have done wrong the name of the field changes i am unable to find out where is the problem.

当复选框的值合适时,这是我的屏幕截图:这里的精细字段效果很好

Here my screen shot when checkbox values were fine:here is fine fields working good

这是屏幕截图,上面有多个问号,如????这些变得烦人 此字段的值带有????此字段中不应有任何问号

And this here is screen shot there is multiple questions marks like ???? and these becoming annoying this fields value are with ???? there should not any question marks in this field

我的表单中这些复选框的值是:

And my form where these checkboxes value are:

                  <form id="preferences_form" role="form" method="POST" novalidate action="{{ url('/preference') }}" class="mujucet-registration">
                            {{ csrf_field() }}
                            <h5>Nastavení zpráv</h5>
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="checkbox">
                                        <label  for="ch1">
                                            <input type="checkbox" name="monthly" value="1" id="ch1"><span class="cr"><i class="cr-icon fa fa-check"></i></span>Mesícní výpisy
                                        </label>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="checkbox">
                                        <label >
                                            <input type="checkbox" name="weekly" value="1"><span class="cr"><i class="cr-icon fa fa-check"></i></span>Týdenní prehled
                                        </label>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="tax_reviews" value="1"><span class="cr"><i class="cr-icon fa fa-check"></i></span>Danové výpisy
                                        </label>
                                    </div>
                                </div>

                                <div class="col-md-4">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="quarterly" value="1"><span class="cr"><i class="cr-icon fa fa-check"></i></span>Ctvrtletní výpisy
                                        </label>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="annually" value="1"><span class="cr"><i class="cr-icon fa fa-check"></i></span>Rocní výpisy
                                        </label>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="newsletter" value="1"><span class="cr"><i class="cr-icon fa fa-check"></i></span>Novinky
                                        </label>
                                    </div>
                                </div>

                                <div class="col-md-12">
                                    <div class="checkbox">
                                        <label class="border">
                                            <input type="checkbox" name="direct_mail_reviews" value="1"><span class="cr"><i class="cr-icon fa fa-check"></i></span> Chci výpisy zasílat také Poštou <span class="light">20 kc za výpis</span>
                                        </label>
                                    </div>
                                </div>

                            </div><h5>Kontaktní preference</h5>
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="email" value="1"><span class="cr"><i class="cr-icon fa fa-check"></i></span>Email
                                        </label>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="sms" value="1"><span class="cr"><i class="cr-icon fa fa-check"></i></span>SMS
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </form>                    </div>

我不喜欢我的复选框的值在这里很奇怪,您的帮助将受到高度赞赏!

I dont how my checkboxes value goes weird here your help will be highly appreciated!

推荐答案

对我来说,它看起来像是编码问题.确保在两种情况下都使用相同的视图,并且在两种情况下都使用相同的编码(我假设UTF-8):

For me it looks like encoding problem. Make sure that you use same view in both cases, and in both cases you have same encoding (I assume UTF-8):

<meta charset="utf-8">

在HTML的<head>部分中.

还要确保文件以与上面声明的相同的编码保存.

Also make sure the file is saved in same encoding as you declared above.

这篇关于归档值使用复选框意外更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆