[Skip to main content](#vessel-content)

#   Bootstrap custom field inputbox change class

##

- **[maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")**
- [![maujbigo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32468-maujbigo "View maujbigo's Profile") Topic Author
- [ Offline](/forum/user/32468-maujbigo)

Less More

- Posts: 147
- Thank you received: 6
-
-

10 years 9 months ago [\#228051](#228051) by [maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")  *[Bootstrap custom field inputbox change class](/forum/27-checkout/881938-bootstrap-custom-field-inputbox-change-class#228051 "Hi, I created an override for registration&#95;bootstrap and one for custom&#95;fields&#95;boostrap I was able to change the html container just fine however I can find how to change the class 'inputbox' I need to use 'form-control' as the input field class.  Thanks, appreciate the help.")* was created by *[maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")*

Hi,
I created an override for registration_bootstrap and one for custom_fields_boostrap
I was able to change the html container just fine however I can find how to change the class 'inputbox'
I need to use 'form-control' as the input field class.

Thanks, appreciate the help.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzOC1ib290c3RyYXAtY3VzdG9tLWZpZWxkLWlucHV0Ym94LWNoYW5nZS1jbGFzcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 9 months ago [\#228055](#228055) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Bootstrap custom field inputbox change class](/forum/27-checkout/881938-bootstrap-custom-field-inputbox-change-class#228055 "Hi, I created an override for registration&#95;bootstrap and one for custom&#95;fields&#95;boostrap I was able to change the html container just fine however I can find how to change the class 'inputbox' I need to use 'form-control' as the input field class.  Thanks, appreciate the help.")*

Hi,

This class is set in a core file, the file "administrator/components/com_hikashop/classes/field.php", so editing this file is not a very good idea, every time you will update the changes will be lost.

So two solutions can be present, create an override of that class, or add some javascript in your template js file to replace the class of these specific html elements.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzOC1ib290c3RyYXAtY3VzdG9tLWZpZWxkLWlucHV0Ym94LWNoYW5nZS1jbGFzcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")**
- [![maujbigo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32468-maujbigo "View maujbigo's Profile") Topic Author
- [ Offline](/forum/user/32468-maujbigo)

Less More

- Posts: 147
- Thank you received: 6
-
-

10 years 9 months ago [\#228100](#228100) by [maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")  Replied by *[maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")* on topic *[Bootstrap custom field inputbox change class](/forum/27-checkout/881938-bootstrap-custom-field-inputbox-change-class#228100 "Hi, I created an override for registration&#95;bootstrap and one for custom&#95;fields&#95;boostrap I was able to change the html container just fine however I can find how to change the class 'inputbox' I need to use 'form-control' as the input field class.  Thanks, appreciate the help.")*

Hi xavier, thanks for getting back to me.
Would it be possible to use setFieldAttribute('fieldName', 'class', 'myclass')

In the custom_fields_boostrap override at all?

Just a small feedback note you guys may consider for future releases:
field and markup classes is something that in my opnion should always be an easy thing to change/add. A number of templates use different css frameworks, been able to use an specific framework class will help reduce the duplication in styles.

I appreciate e can change the container in the custom_fields_boostrap but changing the field classes would also be handy.

![;)](/media/kunena/emoticons/24.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzOC1ib290c3RyYXAtY3VzdG9tLWZpZWxkLWlucHV0Ym94LWNoYW5nZS1jbGFzcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

10 years 9 months ago [\#228196](#228196) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bootstrap custom field inputbox change class](/forum/27-checkout/881938-bootstrap-custom-field-inputbox-change-class#228196 "Hi, I created an override for registration&#95;bootstrap and one for custom&#95;fields&#95;boostrap I was able to change the html container just fine however I can find how to change the class 'inputbox' I need to use 'form-control' as the input field class.  Thanks, appreciate the help.")*

Hi,

You don't need to edit directly the core file as Xavier said.
You can actually do that change directly in the custom_fields_boostrap view file as an override.
Just change the code : Code:

echo $this-&gt;fieldsClass-&gt;display( $oneExtraField, @$this-&gt;$type-&gt;$fieldName, 'data['.$type.']['.$fieldName.']', false, ' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$type.'\',0);"', false, $this-&gt;extraFields[$type], $this-&gt;$type );

to: Code:

echo str_replace('inputbox','form-control', $this-&gt;fieldsClass-&gt;display( $oneExtraField, @$this-&gt;$type-&gt;$fieldName, 'data['.$type.']['.$fieldName.']', false, ' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$type.'\',0);"', false, $this-&gt;extraFields[$type], $this-&gt;$type) );

The following user(s) said Thank You: [maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzOC1ib290c3RyYXAtY3VzdG9tLWZpZWxkLWlucHV0Ym94LWNoYW5nZS1jbGFzcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")**
- [![maujbigo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32468-maujbigo "View maujbigo's Profile") Topic Author
- [ Offline](/forum/user/32468-maujbigo)

Less More

- Posts: 147
- Thank you received: 6
-
-

10 years 9 months ago [\#228345](#228345) by [maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")  Replied by *[maujbigo](/forum/user/32468-maujbigo "View maujbigo's Profile")* on topic *[Bootstrap custom field inputbox change class](/forum/27-checkout/881938-bootstrap-custom-field-inputbox-change-class#228345 "Hi, I created an override for registration&#95;bootstrap and one for custom&#95;fields&#95;boostrap I was able to change the html container just fine however I can find how to change the class 'inputbox' I need to use 'form-control' as the input field class.  Thanks, appreciate the help.")*

Cool, thanks for that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzOC1ib290c3RyYXAtY3VzdG9tLWZpZWxkLWlucHV0Ym94LWNoYW5nZS1jbGFzcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Ilya Kislov](/forum/user/58437-ilya-kislov "View Ilya Kislov's Profile")**
- [![Ilya Kislov's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58437-ilya-kislov "View Ilya Kislov's Profile")
- [ Offline](/forum/user/58437-ilya-kislov)

Less More

- Posts: 4
- Thank you received: 0
-
-

7 years 1 week ago -  7 years 1 week ago [\#312831](#312831) by [Ilya Kislov](/forum/user/58437-ilya-kislov "View Ilya Kislov's Profile")  Replied by *[Ilya Kislov](/forum/user/58437-ilya-kislov "View Ilya Kislov's Profile")* on topic *[Bootstrap custom field inputbox change class](/forum/27-checkout/881938-bootstrap-custom-field-inputbox-change-class#312831 "Hi, I created an override for registration&#95;bootstrap and one for custom&#95;fields&#95;boostrap I was able to change the html container just fine however I can find how to change the class 'inputbox' I need to use 'form-control' as the input field class.  Thanks, appreciate the help.")*

Hello, its grade, Thank you .
But same problem , please help.
i have the code Code:

/////// foreach($this-&gt;leftFilters as $name =&gt; $filterObj) { if(is_string($filterObj)) echo $filterObj; else echo $filterObj-&gt;displayFilter($name, $this-&gt;pageInfo-&gt;filter); } /////////

in view file - order/listing.php

How to change class="inputbox" to class="someclass"

Last edit: 7 years 1 week ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzOC1ib290c3RyYXAtY3VzdG9tLWZpZWxkLWlucHV0Ym94LWNoYW5nZS1jbGFzcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

7 years 1 week ago [\#312847](#312847) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bootstrap custom field inputbox change class](/forum/27-checkout/881938-bootstrap-custom-field-inputbox-change-class#312847 "Hi, I created an override for registration&#95;bootstrap and one for custom&#95;fields&#95;boostrap I was able to change the html container just fine however I can find how to change the class 'inputbox' I need to use 'form-control' as the input field class.  Thanks, appreciate the help.")*

Hi,

You can change the line: Code:

echo $filterObj-&gt;displayFilter($name, $this-&gt;pageInfo-&gt;filter);

to: Code:

echo str_replace('class="inputbox"', 'class="someclass"', $filterObj-&gt;displayFilter($name, $this-&gt;pageInfo-&gt;filter));

It's basically the same solution as explained before.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzOC1ib290c3RyYXAtY3VzdG9tLWZpZWxkLWlucHV0Ym94LWNoYW5nZS1jbGFzcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Ilya Kislov](/forum/user/58437-ilya-kislov "View Ilya Kislov's Profile")**
- [![Ilya Kislov's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58437-ilya-kislov "View Ilya Kislov's Profile")
- [ Offline](/forum/user/58437-ilya-kislov)

Less More

- Posts: 4
- Thank you received: 0
-
-

7 years 1 week ago [\#312883](#312883) by [Ilya Kislov](/forum/user/58437-ilya-kislov "View Ilya Kislov's Profile")  Replied by *[Ilya Kislov](/forum/user/58437-ilya-kislov "View Ilya Kislov's Profile")* on topic *[Bootstrap custom field inputbox change class](/forum/27-checkout/881938-bootstrap-custom-field-inputbox-change-class#312883 "Hi, I created an override for registration&#95;bootstrap and one for custom&#95;fields&#95;boostrap I was able to change the html container just fine however I can find how to change the class 'inputbox' I need to use 'form-control' as the input field class.  Thanks, appreciate the help.")*

Sorry , on this place the code, it not work, you could try it yourself

I solved this problem that

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
$( ".inputbox" ).removeClass( "inputbox" ).addClass( "form-control" );
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

in my template.js , on ( document ).ready

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzOC1ib290c3RyYXAtY3VzdG9tLWZpZWxkLWlucHV0Ym94LWNoYW5nZS1jbGFzcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

7 years 1 week ago [\#312899](#312899) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bootstrap custom field inputbox change class](/forum/27-checkout/881938-bootstrap-custom-field-inputbox-change-class#312899 "Hi, I created an override for registration&#95;bootstrap and one for custom&#95;fields&#95;boostrap I was able to change the html container just fine however I can find how to change the class 'inputbox' I need to use 'form-control' as the input field class.  Thanks, appreciate the help.")*

Hi,

That's a possibility too. In fact the great thing with your proposal is that it will work for all the views where there are dropdowns with the inputbox class without having to edit each place. So it's even better.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzOC1ib290c3RyYXAtY3VzdG9tLWZpZWxkLWlucHV0Ym94LWNoYW5nZS1jbGFzcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.074 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
