Support » Plugin: Pods - Custom Content Types and Fields » Pods, Elementor & Gravity Forms

  • Resolved mikalmasmedia

    (@mikalmasmedia)


    Hi, I’m using Pods, Elementor & Gravity Forms to create a Front-End Profile and an Edit My Profile Page in which Member roles don’t have access to the wp-admin or dashboard area, but can submit and edit the custom post type “Member Profile”. I’m having trouble getting my Gravity Forms form “Edit My Profile” to update the post, in which it just created a new post each time. I am also trying to find a way to have a hidden field upon submission pre-populate a text field with the post permalink to create a “View My Profile” button that conditionally changes based upon what user is logged in.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Jim True

    (@jimtrue)

    Are you using the Pods Gravity Forms Add-on? Not that you need it, but in your forms, you have access to Merge tags for the currently logged in user that you can use dynamically in your forms.

    You can also pass information back and forth from the pod to the Gravity Form by Using Dynamic Population (shortcode parameters, query values or filters).

    The User Registration add-on for Gravity Forms is also quite powerful for creating a front-end User Profile editor.

    I am using both Pods Gravity Forms Add-On and the User Registration from Gravity Forms as well. I am mainly having issues when a member registers through the Gravity Form “Member Registration” where it creates a post in the custom post type “Member Profile”, but then to edit that Profile with additional fields, it won’t update the already created user “Member Profile” post but simply create a new post. It might be my understanding or missed something in the documentation.

    Plugin Author Jim True

    (@jimtrue)

    Is this a separate post type or are you using User Meta? If you’re doing the latter, we recommend the User Registration add-on. If you’re doing a separate post-type, typically you want to connect them to the user with a relationship field (single select both directions) and make the completion of that ‘profile’ be managed entirely through the menu so only the logged in user can edit it and set the ‘thank you’ from the User Profile submission to route to the profile input form.

    Or make it simple and keep it tied to the User Profile and manage it with the User Registration add-on from Gravity Forms 😉

    • This reply was modified 8 months, 3 weeks ago by  Jim True.

    I’ve tried to keep it as simple and easy as possible. I created a new Custom Post Type with pods named “Member Profile” in which a post is created when a member registers using a Gravity From “Member Registration”. I used the Pods: Gravity Forms Add-On to link and connect the Pod Fields with the Form fields. I have no issue with creating a post upon submission with that data submitted. But when I try to use a second Gravity Form, “Edit My Profile”, it prepopulates with the correct data but then creates a new “Member Profile” post. So then a member would have 2 profiles. Again, I could be doing it wrong, or simply not understanding.

    Plugin Author Jim True

    (@jimtrue)

    Well, you need to make sure that you’ve enabled editing the existing post-type, basically that means incorporating it into the Single Detail Template for that post-type, that allows the Pods Gravity Forms Add-on to handle populating and editing the existing post. You need to obviously hide that form unless the user logged in IS the user whose Member Profile they’re viewing.

    If you’re getting the Edit My Profile properly populated, it should not be creating a new post but editing the existing. How are you handling the pre population of the existing profile?

    I’m not too sure what you mean by “that you’ve enabled editing the existing post-type” through a single detail template? Do you mean create a pods template for that post type using the pods_gf_addon_edit_id function? In which case, I don’t know too much about writing and handling those.

    Plugin Author Jim True

    (@jimtrue)

    Well, the way the current population and editing of the existing post type is by placing the Gravity Forms on the Single Detail Template for that post type, unless you hook into more complicated methods with PHP.

    Since you’re using Elementor Pro, you should be able to use the Theme Builder to create a Single Detail ‘template’ for that post type and just insert the form onto that Layout or View. You should be able to ‘hide’ it for non-logged in users or make it only show the form for the user that matches the profile logged in user id (since that would be the value in the relationship field for that linked user account).

    If you’ve created an entirely different layout, ‘edit my profile’, you’re probably going to need to join our Slack Chat at https://pods.io/chat/ and I can try to link you up with Scott to help you with ‘linking’ the form to the user and make sure two entries are not created. By default, the Gravity Form creates an ‘entry’ and it’s linked to a post through the feed. There is sync’ing between those, but that’s part of the ‘editing existing post with Gravity Forms’.

    BTW, editing an existing post on the front-end is not simple by any means; there’s a reason WP doesn’t provide any facility for it. Make sure you’re charging your client appropriately for this functionality.

    Gotcha. I have a template created in Elementor for that post type, with the Gravity Form then placed on it, as well as using Elementor Dynamic Content with Pods. All of that echoes what’s submitted through the registration form. I was under the impression that I could use another form to then edit that post with the fields linked and essentially “update” the existing post already created. I just didn’t know if that was something the pods_gf_addon_edit_ function would work with. Or even if that’s what you mean. I’m not sure where to look to “sync” the two as you said. But thank you very much for answering a good amount of my questions and helping me. If you think Scott can help, I am all for it. But again, don’t want to get into anyone’s hair if it’s not possible.

    Plugin Author Jim True

    (@jimtrue)

    If you have the form on the template, is it populating naturally? Or are you having to do something to make the fields populate?

    What do you have checked/enabled in that form settings in the Gravity Forms Pod Feed?

    Populating naturally by way of Pods: Gravity Forms Add-on Pod Feed. Otherwise right now, nothing else interfering with it to keep it simple and easy.
    Within the Pods Feed on Gravity Forms I have checked
    1) Update Pod Item If The Entry Is Updated
    2) Enable Editing With This Form Using Current Post

    Plugin Author Jim True

    (@jimtrue)

    I wonder if it’s because you’re using two separate forms; one for creation and one for editing. Can you make the creation one also the ‘editing’ one?

    I honestly think that might be it based on the fact it’s not editing the existing post, and all the feeds are matched up. I wasn’t sure if there was a way in which you could Link the two or sync them up. I’ve used Gravity Forms in the Past for user registration, and I used two Forms, one for registering the members, and another separate form to edit the profile info. But as I need a Custom Post Type (“Member Profile”) for custom fields and info, I assumed that Gravity forms and Pods would do that again, like user registration add on and sync up.
    I’m trying to make the “Member Registration” form a basic registration form to just create a login, and then use the “Edit My Profile” Form as the post creation and edit from that.

    But even when I use that “Edit My Profile” again to update it, it once again creates a new post instead of an update.

    Plugin Author Jim True

    (@jimtrue)

    Can you please bring this to our Slack Chat? This is incredibly hard to work in back and forth on the forums.

    Yes. Just replied on there.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Pods, Elementor & Gravity Forms’ is closed to new replies.