Results 1 to 5 of 5

Thread: How to have custom fields per category?

  1. #1
    Thread Starter
    Junior Member
    Not a Verified Customer
    hewitt's Avatar
    Join Date
    Apr 2009
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to have custom fields per category?

    Basically what I want is to have appropriate fields for each ad category that posters will fill up.

    For example, my ad categories are:
    - Cars
    - Real Estate
    - Business Establishments

    If a poster will post an ad under the category "Cars", the required fields should be: Brand, Model, Mileage, Price.

    If the ad will be under "Real Estate", fields that should be filled up are: Type (House, Condo, Apartment), Location, Number of Bedrooms, Price.

    If the ad is under "Business Establishments", required fields: Name of Establishment, Type of Business, Contact Details.

    I'm thinking the fields should automatically change after the user has chosen what exact category the ad is.

    Please help how I can include this in my Classipress.

  2. #2
    Member
    Not a Verified Customer
    redsoxmaniac's Avatar
    Join Date
    Apr 2009
    Posts
    63
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How to have custom fields per category?

    I think what has to happen for that is that:

    A: You have to add all of these to one form, and have them fill out the information based on the category ( so all the options are "optional depending on the listing". For instance, you would have brand, model, mileage, price, location, number, bedroom etc. all on one page. Price should stay a constant field since it essentially means the same thing for all ads ( how much?)

    B: You could try to make three separate forms, and add the meta-fields for each, and have the post a classifieds link go to the form links, where you could choose one of the three forms. I think both are viable.

    A might be a lot of stuff on the page, maybe you can add some type of tab/div function so people can choose the fields they want to fill out ( tab 1: car fields, tab 2 house fields, etc).

    I am working on that now. My only trouble is I am still a little miffed with Wordpress on how to add fixed custom field values ( location: 1,2,3 ) where it drop-downs. If anyone can give me three sentences ( do I add this straight into the DB? Do I add this into the custom field in the post, and fetch those values in a form? ).

    But I am also working on this. So we should keep in touch if there is a breakthrough

    If a poster will post an ad under the category "Cars", the required fields should be: Brand, Model, Mileage, Price.

    If the ad will be under "Real Estate", fields that should be filled up are: Type (House, Condo, Apartment), Location, Number of Bedrooms, Price.

    If the ad is under "Business Establishments", required fields: Name of Establishment, Type of Business, Contact Details.

  3. #3
    Thread Starter
    Junior Member
    Not a Verified Customer
    hewitt's Avatar
    Join Date
    Apr 2009
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to have custom fields per category?

    I hope dcowgill and the Classipress guys can include this on the next version so we won't have to deal with this ourselves

    As for Option A, I think this crowds out the form.

    I prefer Option B where the options change depending on the ad category the user is filling up.

  4. #4
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Re: How to have custom fields per category?

    It's doable but you'd basically need to create a lot of custom fields and many separate forms. I'd recommend hiring a developer to do this sort of advanced customization unless you are comfortable with WP templates. At some point I'd like to have ClassiPress have this feature but it will be much further down the road. Lots of other features on the roadmap first but I'll keep your suggestions in mind.

  5. #5
    Veteran pinocchio's Avatar
    Join Date
    Sep 2010
    Location
    United Kingdom
    Posts
    633
    Thanks
    83
    Thanked 21 Times in 16 Posts
    very very very useful idea I think every1 needs it ! classified means classified so everything must be classified

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)