# Ahmed

1. ## User's who post to classified have a profile page, this should be 'Prettier" to encourage more signups

Vote
Check!
(thinking…)
Reset
Signed in as (Sign out)
You have left! (?) (thinking…)
• ## dependent additional fields

Vote
Check!
(thinking…)
Reset
Signed in as (Sign out)
You have left! (?) (thinking…)
Ahmed commented  ·

We need this feature. Has to be prioritized. It limits your classified tremendously. Implementing this feature will open a lot of doors.
My site is another example where we need this:

Category list of car parts.

For each car part selected a user can then select car model, make and year for that part.

Right now I have to create custom fields of all my car models, makes and years but these fields do not cascade. So if a user selects a make, the other fields should update but they do not... The only way around this now is to create these three fields as categories for every part. Not practical at all

I have been monitoring this thread for a few months now, what is the reason for the delay on this ?

You can easily add code in the your item controller that will not add any stress to the server.

Here is a pseudo code snippet idea:

1) Add a new custom field type in dj_classified that has cascade enabled and allows you to add other custom fields to it.

Example:
custom field 1:
name: "car_make"
Show when value selected: *blank* will show the field regardless of value
linked to: "car part 1", "car part 2", "car part 3" ( can select 1 category or multiple categories or custom fields VERY IMPORTANT)
Type: "selectlist"
values: "BMW","VW","Honda"...

custom field 2:
name: "model_Honda"
Show when value selected: "Honda"
Type: "selectlist"
values: "Accord","Civic"

custom field 3:
name: "car_year"
show when value selected: *blank*
linked to: "model_Honda", "model_BMW", "model_VW"...
Type: "selectlist"
Values: "2016","2015","2014"...

2) Go to com_djclassifieds\controllers\item.php

3) Go to line 769 where you find the following code:

echo '<input class="inputbox" type="text" size="30" value="'.$value.'" name="se_'.$fl->id.'" />';
}else if($fl->search_type=='select'){ 4) right after that you can add a code comparison. If$fl->id = id where special_type "cascade" exists Then load related custom field(s) add an onchange handler to grab related fields when custom field changes.
example:

echo '<select class="inputbox" onchange="updateField(*CUSTOM FUNCTION AND VARIABLES*)" name="se_'.\$fl->id.'" >';

5) update your mod_djclassifieds_search default view with the updateField function to grab related cascaded fields when a user selects a different value from the current field.

6) profit

Note: How you handle the sql side is up to you, but since you do a onchange handler you won't be loading all the data in one go. Server load should be ok.

Ahmed commented  ·

Just got this component and this feature would definitely add a lot more versatility to it. Up voted, we need this !

Ahmed supported this idea  ·