I'm trying to figure out how to have one drop down that would basically be a category... then another dropdown that would be a sub-category. Let's say I have 'trees' for a main category. Then I want the sub-category to only show dependent sub-categories like 'elm' and 'pine', but not 'bmw' because that would go with 'cars' as the top level category. Kind of a long explanation for something that you see all the time haha.
Anyway, I've tried all kinds of things. I created a stand-alone category creator form where you select the parent category and it inserts that parent category into a new column I created in the database for the sub-category, 'parent'. I'll attach a snapshot of the table in case that was confusing.
I then created a Query Drop Down type field for this subcategory and used the following statement...
SELECT fieldvalueid,fieldid,fieldtitle,fieldlabel,parent FROM jos_comprofiler_field_values WHERE parent = '[cb:userdata field="cb_cats" /]';
No luck there. For one, the 'cb_cats' field would have to be saved (and I could possibly make the 'cb_cats' field only available and required at registration, which might solve this). But, not only is the query not working (it's selecting all categories instead of just ones with the parent they had selected), but it's also showing them duplicated, which I believe might be a bug in the query drop down. I'll paste the html that was output at the bottom of this post.
Conditionals would work for this, but there is only 5 conditional tabs available, which isn't enough.
Is there any way to accomplish this? I should mention I have the query plugin version 4.0.5 so there is no 'update on' parameter. I don't even know if that would help. And if it would, I don't think there's a way to 'buy a new version' of it.
<select name="cb_subcats" id="cb_subcats" class="form-control" aria-invalid="false">
<option value=""></option>
<option value="Catering Company" id="cbf258">Catering Company</option>
<option value="Wedding Assistant" id="cbf259">Wedding Assistant</option>
<option value="Catering Company" id="cb_subcats__cbf2">Catering Company</option>
</select>