Jump to content

dependent configurable options?


bixul

Recommended Posts

Hi,

 

I've done a bit of searching and haven't found any way to do this, but I'm pretty new to WHMCS, so maybe I'm missing something obvious (or not so)? I have a site where the owner wants to toggle on/off some options depending on a yes/no choice of a previous option. For example...

 

Manage Backups? Yes/No

 

Backup Configuration choices...

 

They want to toggle off / hide /grey out / something like that the configuration choices if the user has selected "No" for Manage Backups.

 

I haven't found any way to do that. Configurable Options themselves don't seem to have that capability. In fact, I found a feature request for such a thing here (https://requests.whmcs.com/responses/dependent-configurable-options). Addons don't seem appropriate, and hooks don't seem to let me hook into any "client side" events? So I think I'm out of luck. But I thought I'd check if anyone had any ideas.

 

Thanks.

Link to comment
Share on other sites

I looked into this a few weeks ago answering another question... I think theoretically it would be possible - not out of the box, so you'd have to use jquery / javascript to hide blocks depending upn the previous answer.

 

that said, I never tried writing any code to do it because, in that instance, there was an easier way to do what the questioner asked.

 

in your case, it might just be easier to make "No" one of the options in the config option dropdown - then the customer would only have to answer one question rather than two (e.g Yes and the backup selection)

Link to comment
Share on other sites

I looked into this a few weeks ago answering another question... I think theoretically it would be possible - not out of the box, so you'd have to use jquery / javascript to hide blocks depending upn the previous answer.

 

that said, I never tried writing any code to do it because, in that instance, there was an easier way to do what the questioner asked.

 

in your case, it might just be easier to make "No" one of the options in the config option dropdown - then the customer would only have to answer one question rather than two (e.g Yes and the backup selection)

 

Ah. Well, I'm guessing I can figure out the jquery/javascript, I just hadn't figured out a place where I had access to the client side events. I'll go back and take another look (although if you have any more detail about *where* that javascript/jquery would hook in, that's be great!).

 

I did suggest to the owner of the site that they might switch their configuration to a single drop down with the various choices, but that was a somewhat hesitant suggestion, because even with the test setup they had, the total # of choices was already about 15-20, which seemed a bit high to me (their original config is actually a "parent" choice, and then two drop down boxes, one with I think 5 things in it, and one with 3 - so 15 combinations total if the parent is set to "yes" - so 16 total to convert to a single set of choices when the "No" is included.)

 

Thanks for the help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated