Forum: F.A.Q

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

Add location field to custom post that users add on the front end?

Home Forums F.A.Q Add location field to custom post that users add on the front end?

This topic contains 29 replies, has 9 voices, and was last updated by  Jonathan Sommers 8 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #33543

    Jonathan Sommers
    Participant

    How to I add a location fioeld to my custom post type for the front end? My users log in and add their location but I want them to submit a new post type and use the auto locator to fill the location field in before they submit. How can I do this? I need this to work as Im using the nearby add on to display custom posts near the user.

    Help Please.

    #33568

    Eyal Fitoussi
    Keymaster

    Hi Jonathan,
    GEO my WP does not provide a front-end post submission. But you could accomplish it in two ways.
    1) Use a front-end post submission plugin ( there are free plugins for that ) to create posts from the from-end. When you do so I can provide you with a function that will save the address entered when submitting a post into GEO my WP tables.

    2)You can use Gravity Forms Plugin together with Gravity Forms GEO Fields add-on if you want to build a front-end form that will provide a Map, auto-locator button, autocomplete field and more.

    #33567

    Will Macmillan
    Participant

    Hi Eyal – can you post that code or can I get that code from you? I’m looking to do a similar thing here.

    #33566

    Eyal Fitoussi
    Keymaster

    Hi Will,
    Which plugin are you using to post from the front-end?

    #33565

    Will Macmillan
    Participant

    Hey Eyal sorry for the delay. So actually I’m looking at going a different direction that I originally planned and will be using gravity forms most likely to handle the uploading. I’m going to be using the custom post types add on for gravity forms for people to be able to upload from the front end. My question for you is will your add on work to pre populate a custom post type’s address info with the gravity form information? Hopefully that makes sense 🙂

    #33564

    Will Macmillan
    Participant

    Also as an add on to this question if I have your user add on can I pull the user address to pre populate the gravity form with their location when posting? For instance you can pull other user meta into gravity forms when the user is logged in (phone, email , username etc).

    #33563

    Eyal Fitoussi
    Keymaster

    Hi Will,
    I am sorry but I am not sure I understand”

    “My question for you is will your add on work to pre populate a custom post type’s address info with the gravity form information?”

    Can you give an example of what you want trying to accomplish?

    if I have your user add on can I pull the user address to pre populate the gravity form with their location when posting?

    Are you referring to WP Users Geolocation add-on. If so than you most likely won’t be able to do that. Not out of the box and not right now. But I can look into that. I am now working on an update of the add-on and one of the new features I want to add ( per users request ) is the ability to automatically add the user’s ( author ) location to each post he/she creates. I think it is something similar to what you are looking for?

    #33562

    Will Macmillan
    Participant

    No problem it’s a little confusing. Here’s what I’m thinking. Using Gravity forms + the Gravity Forms Custom Post Type plugin () allows you to upload from the front end. What I’m wondering is if I use your gravity forms add on can I populate the location of a custom post type? Not sure if that’s clearer? I guess what I’m asking is is the location data stored as meta of the custom post type? If it is it should work.

    #33561

    Will Macmillan
    Participant

    Oh and as for the user info does the plugin store the address info as user meta? If it does then gravity forms will work with that out of the box

    #33560

    Will Macmillan
    Participant

    Nevermind actually – you answer the first question in your description of the plugin I just never noticed it! It will work with custom post types plugin. Thanks 🙂

    #33559

    Eyal Fitoussi
    Keymaster

    OK,
    Yes it should work with Gravity Forms Custom Post Types plugin as well as with Gravity Forms Update Post plugin if you’ll use it in the future.

    As for the users add-on; The information is being saved in a custom table in database rather than user meta. That is why I suggested that it will not work for you. But again, I can look into that when working on the next update and see if anything can be done.

    #33558

    Will Macmillan
    Participant

    Ok sounds good on the user meta thing!

    #33557

    Tom Poon
    Participant

    When you do so I can provide you with a function that will save the address entered when submitting a post into GEO my WP tables.

    Hi Eyal,
    Would it be possible to use this function with formidable pro?

    Thanks!

    #33556

    Tom Poon
    Participant

    Woops, forgot to ask whether lat/long values will work as well?
    With formidable pro I can make a form that outputs lat/long values, it would be awesome if I can use these values with Geo My WP!

    #33555

    Ill Lily
    Participant

    Yes, I’d love to have the code you mentioned for inserting this plugin’s fields into the front end. Thank you!

Viewing 15 posts - 1 through 15 (of 29 total)

The topic ‘Add location field to custom post that users add on the front end?’ is closed to new replies.