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

#   Can we use Conditional Logic on Custom Field?

##

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

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 7 months ago [\#267805](#267805) by [sapura](/forum/user/37805-sapura "View sapura's Profile")  *[Can we use Conditional Logic on Custom Field?](/forum/26-product-category-display/889892-can-we-use-conditional-logic-on-custom-field#267805 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.0  Can we use Conditional Logic on Custom Field?, so we can create dynamic form.  for example: I have 2 custom fields (both drop down) : department and sub&#95;department If i select department field equals to sales, Then in sub&#95;department only able to select : sales internal , sales external If i select department field equals to purchasing, Then sub&#95;department i only able to select : purchasing internal , purchasing external  Can this be done without code customisation?  please advise")* was created by *[sapura](/forum/user/37805-sapura "View sapura's Profile")*

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.0

Can we use Conditional Logic on Custom Field?, so we can create dynamic form.

for example:
I have 2 custom fields (both drop down) : department and sub_department
If i select department field equals to sales, Then in sub_department only able to select : sales internal , sales external
If i select department field equals to purchasing, Then sub_department i only able to select : purchasing internal , purchasing external

Can this be done without code customisation?

please advise

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

Less More

- Posts: 86586
- Thank you received: 14325
-
-

9 years 7 months ago [\#267819](#267819) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can we use Conditional Logic on Custom Field?](/forum/26-product-category-display/889892-can-we-use-conditional-logic-on-custom-field#267819 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.0  Can we use Conditional Logic on Custom Field?, so we can create dynamic form.  for example: I have 2 custom fields (both drop down) : department and sub&#95;department If i select department field equals to sales, Then in sub&#95;department only able to select : sales internal , sales external If i select department field equals to purchasing, Then sub&#95;department i only able to select : purchasing internal , purchasing external  Can this be done without code customisation?  please advise")*

Hi,

Yes. You can use the "display limited to" setting of the custom fields so that a custom field will be displayed or not based on what is selected in another custom field.
So in your case, you would actually need three custom fields:
- one to display the choice sales/purchasing
- one to be displayed when sales is selected
- one to be displayed when purchasing is selected

That way, no code is necessary.

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

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