Page 1 of 16 12311 ... LastLast
Results 1 to 10 of 156

Thread: Posting Ad: 2 Stage Category Selection - nearly working

  1. #1
    Thread Starter
    lucasstarbuck's Avatar
    Join Date
    Oct 2010
    Posts
    86
    Thanks
    10
    Thanked 12 Times in 6 Posts

    Posting Ad: 2 Stage Category Selection - nearly working

    Hey everyone,

    I've read on other alternatives for category selection, when you have a lot, but to me nothing beats a 2-stage selector, first choosing the parent, and then getting a list of the children.

    So first the good news:

    I have got two menus showing exactly the correct information, and have changed them so that the second one is the one feeding the ID into the form they sit in, so in theory the next page should load fine.



    What we need to get it working:

    We need to use jQuery to get the second menu to be loaded after the first one is chosen, using the variable "child_of" and the ID number of the parent category.

    Not too tricky, but I've never used jQuery so I wanted to ask the community here to see if anyone can easily glue this together, and create an awesome mod for Classipress! I found info about the jQuery function to use, but got stuck (.load() – jQuery API)

    From 'includes/forms/step1.php' line 40
    Code:
     <form name="mainform" id="mainform" class="form_step" action="" method="post">
    
                        <ol>
    
                            <li>
                                <label><?php _e('Cost Per Listing','appthemes');?>:</label>
                                Always FREE (upgrade to a Featured Listing for just $9.90)<?php //cp_cost_per_listing(); ?> <?php // printf(__('for %s days', 'appthemes'), get_option('cp_prun_period')); ?>
                                <div class="clr"></div>
                                
                                
                            </li>
    
                            <li>
                            <label><?php _e('Select a Category:','appthemes');?></label>
    
                            <?php
    
                            if (get_option('cp_price_scheme') == 'category' && get_option('cp_enable_paypal') == 'yes') {
    
                                cp_dropdown_categories_prices('show_option_none='.__('Select one','appthemes').'&class=dropdownlist&orderby=name&order=ASC&hide_empty=0&hierarchical=1&taxonomy=ad_cat');
    
                            } else {
    
                               //ORIGINALwp_dropdown_categories('show_option_none='.__('Select one','appthemes').'&class=dropdownlist&orderby=name&order=ASC&hide_empty=0&hierarchical=1&taxonomy=ad_cat');
    						   
    						   wp_dropdown_categories('show_option_none='.__('Select one','appthemes').'&class=dropdownlist&orderby=name&order=ASC&hide_empty=0&hierarchical=1&taxonomy=ad_cat&depth=1&name=preselect');
    						 
    						 wp_dropdown_categories('show_option_none='.__('Select one','appthemes').'&class=dropdownlist&orderby=name&order=ASC&hide_empty=0&hierarchical=1&taxonomy=ad_cat&child_of=4');
    
                            }
    
                            ?>

    Really appreciate any help with this, I see it being valuable to a lot of members, but I've taken it as far as I can.

    Cheers,
    Luke

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,009
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    lucasstarbuck's Avatar
    Join Date
    Oct 2010
    Posts
    86
    Thanks
    10
    Thanked 12 Times in 6 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,009
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  5. #5
    Veteran vienna's Avatar
    Join Date
    May 2010
    Location
    Vienna, Austria
    Posts
    718
    Thanks
    19
    Thanked 177 Times in 118 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #6
    Thread Starter
    lucasstarbuck's Avatar
    Join Date
    Oct 2010
    Posts
    86
    Thanks
    10
    Thanked 12 Times in 6 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #7
    Veteran vienna's Avatar
    Join Date
    May 2010
    Location
    Vienna, Austria
    Posts
    718
    Thanks
    19
    Thanked 177 Times in 118 Posts

    heading in that direction

    You must be an AppThemes customer and logged in to view this response. Join today!

  8. #8
    Veteran vienna's Avatar
    Join Date
    May 2010
    Location
    Vienna, Austria
    Posts
    718
    Thanks
    19
    Thanked 177 Times in 118 Posts

    Post ad ajax form mod

    You must be an AppThemes customer and logged in to view this response. Join today!

  9. #9
    Veteran vienna's Avatar
    Join Date
    May 2010
    Location
    Vienna, Austria
    Posts
    718
    Thanks
    19
    Thanked 177 Times in 118 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  10. #10
    Thread Starter
    lucasstarbuck's Avatar
    Join Date
    Oct 2010
    Posts
    86
    Thanks
    10
    Thanked 12 Times in 6 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Page 1 of 16 12311 ... LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Ad posting: Category Sub-category selection
    By lucasstarbuck in forum ClassiPress General Discussion
    Replies: 2
    Last Post: February 23rd, 2011, 04:53 PM
  2. Category selection when posting new ad
    By greencode in forum ClassiPress General Discussion
    Replies: 5
    Last Post: August 16th, 2010, 04:41 AM
  3. Blog categories in post category selection
    By rtibbs4 in forum Help Using ClassiPress
    Replies: 2
    Last Post: April 17th, 2010, 09:24 PM
  4. Category selection when posting new ad
    By greencode in forum Help Using ClassiPress
    Replies: 0
    Last Post: December 31st, 1969, 07:00 PM