Dynamically display dropdown based on user input

  • Posts: 35
  • Thank you received: 0
8 years 10 months ago #227297

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.6
-- PHP version -- : 5.5.30
-- Browser(s) name and version -- : Google Chrome 47.0.2526.106

Hello,

We would like to dynamically display a drop-down list based on user input in a previous step.

We have created three radio buttons (Daily/monthly/3 monthly) using characteristics which changes price in the description depending on which one is selected. This is fine and what we need.

We would also like to change the drop-down field below the radio buttons depending on which radio button is selected. Currently, we have two drop-down list displaying but we only want to display one. The drop-down list has been created using options as we have lots of variables.

Example: if a user selects the Daily or Monthly radio button, the Power A drop-down list is shown with Power B hidden. If a user selects 3 monthly, the reverse should happen with Power B shown and Power A hidden.

Is this possible with Hikashop? If so, please tell us how.

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
8 years 10 months ago #227316

Hello,

Example: if a user selects the Daily or Monthly radio button, the Power A drop-down list is shown with Power B hidden. If a user selects 3 monthly, the reverse should happen with Power B shown and Power A hidden.

In your case you'll probably need to use the "Display limited to" option of the custom field configuration page that you want to display regarding the value selected in another custom field.

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 0
8 years 9 months ago #227668

Thanks for your reply Mohamed.

I've tried to configure the 'display limited to' options but have not had much luck.

Can we send you a link to our test site with user credentials for you to have a closer look? If so, do you have an email address where I can send details?

Thanks,
Richard

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #227711

Hello Richard,

We have created three radio buttons (Daily/monthly/3 monthly) using characteristics which changes price in the description depending on which one is selected. This is fine and what we need.


My bad, I didn't saw that you where using characteristics for your 3 radio buttons, there is no option to restrict custom item fields regarding variants.
But if you really want to do it like this, the solution will probably be to directly edit the "show_block_custom_item" file of the "product" view of your front-end template via "Hikashop->Display->Views" (some development skills will be required).

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum