sab Posted September 23, 2018 Share Posted September 23, 2018 Hi everyone, I could have asked the following question in a wrong place. So, I decided to ask here as well. I have two fields in the admin: the second one's values change depending on the first one's chosen value. I wonder if there is any way to change the selectbox type of the dependant field into checkboxes so I can see all the options of the list of subcategories straight away without any extra action. Thanks in advance! *********************** On 11/30/2013 at 7:52 PM, ryan said: Actually, you can do this on the dev branch. Lets assume that cities are children of countries and that is reflected in your page structure (i.e. /countries/france/paris/). Create your 2 page fields (country and city), and configure 'country' as a single page field with "parent" set to "/countries/". Next, for the "city" field configuration, use the "Custom selector to find selectable pages", present on the "input" tab. In that field, enter "parent=page.country". Save and try it out. This works with select, selectMultiple and asmSelect fields (and possibly others), though not yet with checkboxes, radios or PageListSelect. This works perfectly! BUT, still doesn't work with checkboxes. Is there any way to make this method to work with checkboxes or radiobuttons? Thanks! Link to comment Share on other sites More sharing options...
bernhard Posted September 23, 2018 Share Posted September 23, 2018 Are you talking about something like this? 2 Link to comment Share on other sites More sharing options...
sab Posted September 23, 2018 Author Share Posted September 23, 2018 Yes, and in my case, the first field is a select box style, but the second one needs to be a checkbox style instead of hidden selectable options. Thanks. Link to comment Share on other sites More sharing options...
bernhard Posted September 23, 2018 Share Posted September 23, 2018 Do you want to develop something on your own? Do you want to hire someone that develops it for you? Do you want to ask @kongondo if it is possible to add that feature to his module when you purchase it? What are your skills? What is your level of experience with processwire? What is your timeframe? What amount of options do you have (thousands of options or just a few)? etc. --- The more information you provide, the better the answers will be. Edit: Sorry, didn't read the quoted message carefully enough. But still some more information will help in providing better answers ? 1 Link to comment Share on other sites More sharing options...
sab Posted September 23, 2018 Author Share Posted September 23, 2018 I'm a beginner, so I don't really think I can do it by myself. Based on your response, I take it that it's not provided as a built-in option and it requires lots of effort or there's a commercial module. Hmm, in that case, I think I'm just okay with the current possibility with the selectbox and keep learning about processwire as much as I can as there is no urgent timeframe. Thank you for your time, Bernhard! ? Edit: Not really thousands of, but dozens of options max. I'm striving to create a small e-commerce website for myself. And thought, checking subcategories would be easier on the eyes than selecting them. 1 Link to comment Share on other sites More sharing options...
bernhard Posted September 23, 2018 Share Posted September 23, 2018 You're welcome, I don't know of a quick built in way, but sometimes it's easy to solve such things with little hacks - especially when you are not dealing with huge amounts of data. Can you provide an example of values that are in the first pagefield and that would be in the second. Like ryan did in his example: Country / City What kind of data do you have? Are the values of the checkboxes dynamic or do you set them manually? Link to comment Share on other sites More sharing options...
sab Posted September 23, 2018 Author Share Posted September 23, 2018 It's almost identical to that of Ryan's examples. I have main categories like health, food etc. And under the Health, for instance, there are subcategories such as Fasting and so on. I have all of those main and sub categories as pages and the subcategories are nested inside individual respective main categories. Therefore, the values of the checkboxes are predefined manually. Link to comment Share on other sites More sharing options...
bernhard Posted September 23, 2018 Share Posted September 23, 2018 OK, then I can't think of any quick and easy hack, sorry. I agree that checkboxes might be easier for the eyes, but I don't think that's worth the effort. Link to comment Share on other sites More sharing options...
sab Posted September 23, 2018 Author Share Posted September 23, 2018 Yeah, I guess. Thanks anyways ? I will go with what's available if there's no other option available. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now