简体   繁体   English

当输入名称中有空格时,如何从输入中获取值?

[英]How to get value from input when the input has a space in the name?

Maybe this is silly. 也许这很愚蠢。 But I have problem with this. 但是我对此有疑问。 I have dropdown list with some values for example: 我有一些下拉列表,例如:

<select name="Name Kombinezony" class=" fixed-width" id="Name Kombinezony">
<option value="Home">Home</option>
</select>

I have problem to get the value from this beacuase the input file has a space in name. 我有问题要从此获取值,因为输入文件的名称中有空格。 The worst is that I need to have a space in name. 最糟糕的是,我需要在名称中留一个空格。 How to resolve this problem ? 如何解决这个问题? I get the value by using: 我通过使用获得价值:

Tools::getValue($category)

Kind regards ? 亲切的问候 ?

PrestaShop will concatenate it with an underscore, so, you can get the value like this: Tools::getValue('Name_Kombinezony') PrestaShop将使用下划线将其连接起来,因此,您可以像这样获得值: Tools::getValue('Name_Kombinezony')

PD. PD。 Tested in PS 1.7 在PS 1.7中测试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM