Forum: Feature Requests

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Feature Requests premium extension please open a new premium support ticket.

[Resolved]States drop down.

Forums Feature Requests States drop down.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #48868
    aforbes975
    Member

    I’m hoping somebody can help me with this. I’m having trouble isolating the states drop down list, I want it on its own outside of the radius/distance search form. I followed the tutorial below and I can get the drop down to appear right with the radius search below the address form field but I can’t figure out how to put the drop down on its own away from the address/distance of the normal search form. The link below says you can put the gmw_states_dropdown( $gmw ); code anywhere in your forms template file to call it but I couldn’t get it work right. I have m made a child search template and that seems to work, just adding the drop down to the template isn’t working for me. I’m not a heavy coder so I kind of need exact instructions on what to do.

    http://docs.tempform.wpengine.com/filter-results-by-state/

    Thanks for any help,
    Andy

    #48995

    Hi Andy,
    What happens when you add the functions directly to the search form template file?

    #49022
    aforbes975
    Member

    Hey thanks for the response, so what I have is this:

    In the example you have on that tutorial page in the functions file you have

    .
    Now since I was trying to isolate the drop down on its own, I changed mine to this:

    Then in the search-forms.php template, I have tried copying what I thought would be the right code for the drop down and added

    However, that produces nothing on the search page, no drop down, no error even, just looks like the regular default search template. The only way I’ve been able to get the states drop down to work is to use your second example where you add the states drop down before the distance field. So if I add this to my functions file

    and do nothing in the searc-forms.php file, then I get the drop down just fine. I just don’t know what to correctly add to the functions file or search template page to get the drop down on its own.

    Thanks for any help,
    Andy

    #49347

    Sorry Andy for missing out your last reply.

    At the moment, placing the states dropdown outside the form won’t work. The form must be submitted when the states dropdown changes with the value of the state. That is how the value of the state can pass to the search query.

    You will need to customize the script in order to make it work outside the form. Which won’t be very simple.

    #49366
    aforbes975
    Member

    Okay, well thanks for getting back to me. I’ll have to come up with something else I guess. It would be a nice feature though, if it were a paid plugin I would have bought it immediately.

    Andy

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.