I suggest you ...

dependent additional fields

to make dependent additional fields, for example when choosing the stamps appeared with select car models of this brand. now only through the categories and you can implement - but there's no point, in my example, to create 3 000 categories better in dependent fields

137 votes
Sign in
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    PavelPavel shared this idea  ·   ·  Admin →


    Sign in
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      • AhmedAhmed 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.

        custom field 1:
        name: "car_make"
        special_type: "cascade"
        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"
        special type: "cascade"
        Show when value selected: "Honda"
        Linked to: "car_make"
        Type: "selectlist"
        values: "Accord","Civic"

        custom field 3:
        name: "car_year"
        special type: "cascade"
        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.

        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.

      • FabZFabZ commented  · 

        I consider this a very useful option, even though I agree with Tomasz Kowalski: could adversely affect server performance ...
        Perhaps a good compromise could it be to limit to one or maximum two the dependent field levels? In my opinion, to work on 4 or 5 sub-field levels could not make sense.

      • aramco1aramco1 commented  · 

        should we emigrate to another extension to have this feature !

      • AhmedAhmed commented  · 

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

      • centilioncentilion commented  · 

        sorry that I do not have the vote, I would have voted in favor of this idea

      • gamegame commented  · 

        Hello, guys. dependent fields and cascade fields for search module . We are really need it , iam sure. For example how to use DJ-Classifieds for attach cities metro to location if we have more then one city in our site? I need location as a custom field and cascade dependent fields fields also. Now i use category as a city but its a very uncomfortable Because now its look like:"

        Country -

        - City 1 - base categories - sub categories -Attached location fields as a checkboxes (metro, districts)

        - City 2 - base categories - sub categories - Attached location fields as a checkboxes (metro, districts)

        - City 3 - base categories - sub categories -Attached location fields as a checkboxes (metro, districts)

        - City 4 - base categories - sub categories -Attached location fields as a checkboxes (metro, districts)

        - nCities ........"

        but it can be look like":

        Location" Country, City, Attached location fields as a checkboxes (metro, city districts) , base categories - sub categories"

        Its can be much more better, i mean we need cascade cutom fields : FIELD LOCATION: LEVEL1 Country (dropdown) , LEVEL2 City (radiobutton) , LEVEL3 district (checkbox) , metro(checkbox)) , direction , e.t.c.

      • Tomasz KowalskiAdminTomasz Kowalski (CEO, DJ-Extensions.com) commented  · 

        This feature could be very heavy for the servers and can make sites slower, we're still considering if this is something that have more pros or cons.
        Why not using nested categories and fields dependant on the category.
        As you can create fields that are tied to particular category - maybe this is a good option?
        Additionally you could use import functionality to add as many categories as you need (you can check that tutorial: https://dj-extensions.com/faq/dj-classifieds-faq/how-to-import-categories-and-subcategories-to-dj-classifieds )
        what do you think?

      • AntesanAntesan commented  · 

        I have started to built a big site using DJ-Classifieds. I was searching for how to work with dependent fields and found this article in suggestions:-(
        Now, production i stopped since this feature is not implemented. I thought this would be a standard feature in the product. What is the status? Will the function be implemented? Now I need to find another tool that works with dependencies.

      • FenisFenis commented  · 

        I really need this

      • TenuTenu commented  · 

        I know that RS-directory has that feature and is very common to use it on vehicle sites

      • XarXar commented  · 

        A serious option for sure

      • Anonymous commented  · 

        Yes dependent fields or Conditional fields is a must have for a extension like this. All modern classified extensions have this option.

      Feedback and Knowledge Base