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

#   Custom Fiel display in checkout

##

- **[arveni](/forum/user/33539-arveni "View arveni's Profile")**
- [![arveni's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/33539-arveni "View arveni's Profile") Topic Author
- [ Offline](/forum/user/33539-arveni)

Less More

- Posts: 79
- Thank you received: 0
-
-

9 years 9 months ago -  9 years 9 months ago [\#261699](#261699) by [arveni](/forum/user/33539-arveni "View arveni's Profile")  *[Custom Fiel display in checkout](/forum/27-checkout/888722-custom-fiel-display-in-checkout#261699 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.4  Hi, I created a few custom fields in the &quot;order&quot; table to get more info about customer. I added th block &quot;Custom field&quot; in the check out process and it works!!  But I would like to change the display (not just css). so change the code below by adding one by one my custom fields and add more html  ex  Is there any tag or else to custom this part please? I need to display the label ant the input")* was created by *[arveni](/forum/user/33539-arveni "View arveni's Profile")*

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.4

Hi,
I created a few custom fields in the "order" table to get more info about customer.
I added th block "Custom field" in the check out process and it works!!

But I would like to change the display (not just css). so change the code below by adding one by one my custom fields and add more html
Code:

foreach($this-&gt;extraFields[$type] as $fieldName =&gt; $oneExtraField) { if(isset($showfields[$fieldName]) &amp;&amp; $this-&gt;step != $showfields[$fieldName]) { echo '&lt;tr style="display:none;"&gt;&lt;td&gt;&lt;input type="hidden" name="data['.$type.']['.$fieldName.']" value="'.$this-&gt;escape($this-&gt;$type-&gt;$fieldName).'"/&gt;&lt;/td&gt;&lt;/tr&gt;'; continue; } ?&gt; &lt;tr class="hikashop_checkout_&lt;?php echo $fieldName;?&gt;_line" id="hikashop_&lt;?php echo $type.'_'.$oneExtraField-&gt;field_namekey; ?&gt;"&gt; &lt;td class="key"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt; &lt;/td&gt; &lt;td&gt;

ex Code:

&lt;div&gt; custom_field_1 custom_field_2 &lt;/div&gt; &lt;div&gt; custom_field_3 custom_field_4 &lt;/div&gt;

Is there any tag or else to custom this part please? I need to display the label ant the input

Last edit: 9 years 9 months ago by [arveni](/forum/user/33539-arveni "View arveni's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

9 years 8 months ago [\#261744](#261744) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom Fiel display in checkout](/forum/27-checkout/888722-custom-fiel-display-in-checkout#261744 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.4  Hi, I created a few custom fields in the &quot;order&quot; table to get more info about customer. I added th block &quot;Custom field&quot; in the check out process and it works!!  But I would like to change the display (not just css). so change the code below by adding one by one my custom fields and add more html  ex  Is there any tag or else to custom this part please? I need to display the label ant the input")*

Hi,

You will need to completely change the code in the view so the fields won't be displayed automatically in the loop but you will display yourself each field manually.
So you can put the HTML you want between the fields because nothing will be automatic and all will be customized like you want.

Please note that such kind of customization require some PHP skills.
[ www.hikashop.com/support/documentation/1...-display.html#layout](https://www.hikashop.com/support/documentation/153-customize-the-display.html#layout)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[arveni](/forum/user/33539-arveni "View arveni's Profile")**
- [![arveni's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/33539-arveni "View arveni's Profile") Topic Author
- [ Offline](/forum/user/33539-arveni)

Less More

- Posts: 79
- Thank you received: 0
-
-

9 years 8 months ago [\#261784](#261784) by [arveni](/forum/user/33539-arveni "View arveni's Profile")  Replied by *[arveni](/forum/user/33539-arveni "View arveni's Profile")* on topic *[Custom Fiel display in checkout](/forum/27-checkout/888722-custom-fiel-display-in-checkout#261784 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.4  Hi, I created a few custom fields in the &quot;order&quot; table to get more info about customer. I added th block &quot;Custom field&quot; in the check out process and it works!!  But I would like to change the display (not just css). so change the code below by adding one by one my custom fields and add more html  ex  Is there any tag or else to custom this part please? I need to display the label ant the input")*

That is what I want. I would like the generic php code for insert a custom field. I guess is a mix between this to code
Code:

&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt;

Code:

name="data['.$type.']['.$fieldName.']" value="'.$this-&gt;escape($this-&gt;$type-&gt;$fieldName).

with my case custom field are in the "order" table so $type will be "order" and $fieldName will be "custom_field_1" by example

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

9 years 8 months ago [\#261808](#261808) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom Fiel display in checkout](/forum/27-checkout/888722-custom-fiel-display-in-checkout#261808 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.4  Hi, I created a few custom fields in the &quot;order&quot; table to get more info about customer. I added th block &quot;Custom field&quot; in the check out process and it works!!  But I would like to change the display (not just css). so change the code below by adding one by one my custom fields and add more html  ex  Is there any tag or else to custom this part please? I need to display the label ant the input")*

Hi,

Best would to use the "display" function of the Field Class, like it is currently done in the view.
So you will support every type of custom field, input, radio, date picker, etc.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4ODcyMi1jdXN0b20tZmllbC1kaXNwbGF5LWluLWNoZWNrb3V0P3RtcGw9bWFya2Rvd24=) 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.072 seconds

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