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

#   custom javascript in billing/shipping address

##

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

Less More

- Posts: 26
- Thank you received: 0
-
-

10 years 6 months ago [\#238939](#238939) by [issa.mouawad](/forum/user/38443-issa-mouawad "View issa.mouawad's Profile")  *[custom javascript in billing/shipping address](/forum/27-checkout/884284-custom-javascript-in-billing-shipping-address#238939 "-- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.4.8  Hi , I would like to implement special behavior in the address fields, I want to auto-fill the state and country depending on the zip code, I have worked the javascript code out, and tested it in a simple html page, but I can't get it to run inside hikashop checkout . what is the exact view file to update? either I can't find it , or it's being added but not running properly, should I add the script tag ? or use the php addScriptDeclaration function, to insert javascript as string?")* was created by *[issa.mouawad](/forum/user/38443-issa-mouawad "View issa.mouawad's Profile")*

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.4.8

Hi ,
I would like to implement special behavior in the address fields,
I want to auto-fill the state and country depending on the zip code, I have worked the javascript code out, and tested it in a simple html page, but I can't get it to run inside hikashop checkout .
what is the exact view file to update? either I can't find it , or it's being added but not running properly,
should I add the script tag ? or use the php addScriptDeclaration function, to insert javascript as string?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NDI4NC1jdXN0b20tamF2YXNjcmlwdC1pbi1iaWxsaW5nLXNoaXBwaW5nLWFkZHJlc3M/dG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

10 years 6 months ago [\#238941](#238941) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[custom javascript in billing/shipping address](/forum/27-checkout/884284-custom-javascript-in-billing-shipping-address#238941 "-- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.4.8  Hi , I would like to implement special behavior in the address fields, I want to auto-fill the state and country depending on the zip code, I have worked the javascript code out, and tested it in a simple html page, but I can't get it to run inside hikashop checkout . what is the exact view file to update? either I can't find it , or it's being added but not running properly, should I add the script tag ? or use the php addScriptDeclaration function, to insert javascript as string?")*

Hi,

The custom address fields are displayed in several places:
- the file "custom_fields" of the view "user"
- the file "form" of the view "address"
- the file "show" of the view "address"
So you potentially need to add your javascript code in all the three view files via the menu Display&gt;Views.
You can either add a script tag or use the Joomla function to do it. I would recommend to use a script tag.

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

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

Less More

- Posts: 26
- Thank you received: 0
-
-

10 years 6 months ago [\#239041](#239041) by [issa.mouawad](/forum/user/38443-issa-mouawad "View issa.mouawad's Profile")  Replied by *[issa.mouawad](/forum/user/38443-issa-mouawad "View issa.mouawad's Profile")* on topic *[custom javascript in billing/shipping address](/forum/27-checkout/884284-custom-javascript-in-billing-shipping-address#239041 "-- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.4.8  Hi , I would like to implement special behavior in the address fields, I want to auto-fill the state and country depending on the zip code, I have worked the javascript code out, and tested it in a simple html page, but I can't get it to run inside hikashop checkout . what is the exact view file to update? either I can't find it , or it's being added but not running properly, should I add the script tag ? or use the php addScriptDeclaration function, to insert javascript as string?")*

Thanks, it worked fine indeed

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

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